Formula Adjustment Needed.

klatlap

Well-known Member
Joined
Sep 1, 2004
Messages
607
Office Version
  1. 2013
Platform
  1. Windows
I have this formula that another user here created for me, basically it counts cells between 2 reference points, just wondering how i may have it just count the non blank cells.

=IF(Data!AS1="","",MATCH("?*",INDEX(Data!AS:AS,1+MATCH(Data!AT1,Data!AS:AS,0)):Data!AS$1048576,0))
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Not sure how that is counting anything? Match returns the (1st) position of a criteria a range, it does not count.

If you need to count stuff, take a look at using the COUNTIFS() function - it counts all non-blank cells...
=countif(range1,criteria1, range2, criteria2..........................)
 
Upvote 0
As you can see with columns A:C the formula in column C works fine

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

But what i need is for the same result in column H, i have just given the example in H of what i need using the data in Columns F:G



Excel 2010
ABCDEFGH
1test1test15test1test14
2datadata
3data
4datadata
5datadata
6test2test24test2test23
7datadata
8datadata
9data
10test3test33test3test33
11datadata
12datadata
13endend
Sheet1
 
Upvote 0
Try this, copied down to the end of the data in column G.

Excel Workbook
FGH
1test1test14
2data
3
4data
5data
6test2test23
7data
8data
9
10test3test33
11data
12data
13end
Count
 
Upvote 0
Your formula looks to simple, yet it works better than the original, ty
 
Upvote 0
Oops, sorry i should have said that there is formulas in row G so your COUNTA is also counting them even if they are blank
 
Upvote 0
Oops, sorry i should have said that there is formulas in row G so your COUNTA is also counting them even if they are blank
In that case try this in H1

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

Forum statistics

Threads
1,214,606
Messages
6,120,479
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top