getting the sum of letters

andrewb90

Well-known Member
Joined
Dec 16, 2009
Messages
1,077
Hi all! I'm sure this is fairly simple but, how do I add up the total number of times column D has a value of 'B'? The only other thing that may complicate this is some rows column D is merged with other cells so I want that excluded, and I only want to count the cells that are currently visible. Any hidden cells need not be counted.

Thanks,

Andrew
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Tried that but it doesn't exclude the hidden rows. I need to make sure those are excluded.
 
Upvote 0
You can use this formula to exclude hidden rows too. Assumes a range D2:D100

=SUMPRODUCT(SUBTOTAL(3,OFFSET(D2,ROW(D2:D100)-ROW(D2),0)),(D2:D100="b")+0)
 
Upvote 0
Still encountering the same thing. The hidden cells are still getting counted. Scottie what's the subtotal function?
 
Upvote 0
Still encountering the same thing. The hidden cells are still getting counted. Scottie what's the subtotal function?
Try this tweak of Barry's formula.

=SUMPRODUCT(SUBTOTAL(103,OFFSET(D2,ROW(D2:D100)-ROW(D2),0)),--(D2:D100="b"))
 
Upvote 0
Sorry for disturbing you. I have a similar problem, but just more complicated.

I have a combination of
20.10.10x5.15.25/
in cell A1

The problem are:
a. The result for combination before "x" should be the amount of dots (.) + 1, so the result is 3
b. The result for combination between "x" and "/" should be the sum of the numbers, so the result is 45

Then, the results from a and b must be multiplied, so the final result is 135 in cell B1

I'm using Excel 2007 and Windows XP

I really need some help, please. Thank you so much

Best Regards

Jasa
 
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,401
Members
448,893
Latest member
AtariBaby

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