A formula to count with blank cells

Arnolf

Board Regular
Joined
Sep 18, 2005
Messages
78
Hello,
One more time asking for your help.

Perhaps, I have a silly request.
I need to count A and B in a range. Enclose my Sheet.

I know that I can do it filling my range with all A's or B's I'd need, then I'd use COUNTIF. I could hide similar values with Conditional Formatting and that would do the trick.
But, I'd really appreciate someone help me to do it with my example format.
Is this possible ?.
Thank you so much for your assistance.
Arnolf.
Book2.xls
ABCDEFGHIJKLMN
1
212345678910COUNT of ACOUNT of B
3A10
4B8
5AB43
6
7AB19
8AB41
9
Sheet1
 
Greg,
Thanks for your reply.
Your are right. Rows 7 and 8 are ok.


For row 2:
I have B's in column 3, 6 and 7 (column 7 is blank, so it has to take the value to the next left column that has data. That is column 6 with a B). The "count" for the B's should be 3.
I have A's in columns 4, 5, 8, 9, 10. The "count" result should be 5 for the A's. (Columns 5, 9 and 10 are blanks, so they have to take the value to the next left column. Column 4 and column 8).

For row 3:
I have B's in columns 3, 4, 5, 6, 7, 8, 9. So, the "count" for the B's should be 7.
I have an A in column 10. The "count" result is 5.

For row 4:
I have B's in columns 1, 3, 6, 8, 9. So, the "count" for the B's should be 5.
I have A's in columns 2, 4, 5, 7 and 10. The "count" result should be 5.

For row 6:
I have B's in columns 1, 2, 3, 4, 5, 6. The result for the B's should be 6.
I have A's in columns 7, 8, 9, 10. The "count" result should be 4.
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,215,340
Messages
6,124,382
Members
449,155
Latest member
ravioli44

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