OZmium Sports Betting and Horse Racing Forums

OZmium Sports Betting and Horse Racing Forums (http://forums.ozmium.com.au/index.php)
-   General Topics (http://forums.ozmium.com.au/forumdisplay.php?f=59)
-   -   Excel formula help needed. (http://forums.ozmium.com.au/showthread.php?t=30992)

Shaun 27th February 2016 04:05 PM

Excel formula help needed.
 
I currently use this formula

=IF(A1="","",IF(A1="end","",MATCH("?*",INDEX(A:A,1+MATCH(B1,A:A,0)):A$1048576,0)))
to get this result.

Excel 2010
ABC
1test1test15
2data
3data
4data
5data
6test2test24
7data
8data
9data
10test3test33
11data
12data
13end

Sheet1





But what i need is for it to be modified to ignore blank spaces so i can get this result.

Excel 2010
FGH
1test1test14
2data
3
4data
5data
6test2test23
7data
8data
9
10test3test33
11data
12data
13end

Sheet1




walkermac 27th February 2016 06:53 PM

I hacked at your code and got the following, which appears to work:
Code:
=IF(A1="","",IF(A1="end","",COUNTIF(INDIRECT("b"&ROW(B1)&":b"&ROW(B1)+MATCH("?*",INDEX(A:A,1+MATCH(B1,A:A,0)):A$1048576,0)-1),"*")))

Shaun 27th February 2016 11:53 PM

Got to love those guys on the MrExcel forum.

=IF(F1="","",COUNTA(G1:G$13)-SUM(H2:H$13))

Thamks for the help walkermac

Shaun 28th February 2016 12:07 AM

Sorry, both those formulas still count the space because it has a formula in it.

Shaun 28th February 2016 12:30 AM

They came up with a similar code to your, just more compact.

=IF(F1="","",COUNTIF(G1:G$13,"?*")-SUM(H2:H$13))


All times are GMT +10. The time now is 08:49 PM.

Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.