Help... Counting Text in a range of cells

Mykro

Active Member
Joined
Oct 17, 2002
Messages
337
I'm trying to count Text in a range of cells..
=IF(ISNUMBER(B6),COUNTA(City!G6,City!J6,City!M6,City!P6,City!S6,City!V6,City!Y6),"")

But it Seems that COUNTA includes formulas too.. The cells also has a drop down list too.. When the user chooses a city from one of those cells I would like the formula just to total the occurences..

Thanks..
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Try...

=IF(ISNUMBER(B6),SUMPRODUCT(--(MOD(COLUMN(City!G6:Y6)-COLUMN(City!G6),3)=0),--(City!G6:Y6<>"")),"")
 
Upvote 0
Try...

=IF(ISNUMBER(B6),SUMPRODUCT(--(MOD(COLUMN(City!G6:Y6)-COLUMN(City!G6),3)=0),--(City!G6:Y6<>"")),"")

It Didn't work... I wonder if it is because in my formula I sent it dose not include the other cells which include numbers.. H6,I6 - K6,L6 - N6,O6 - Q6,R6 - T6,V6 - W6,X6 or does it matter?
 
Upvote 0
It Didn't work...

Can you be specific? Does it return the wrong answer? Or does it return an error? If the latter, which error value? If the target cells can contain numbers, as well as text and formula blanks (""), then try the following instead...

=IF(ISNUMBER(B6),SUMPRODUCT(--(MOD(COLUMN(City!G6:Y6)-COLUMN(City!G6),3)=0),--(City!G6:Y6<>""),--ISTEXT(City!G6:Y6)),"")


I wonder if it is because in my formula I sent it dose not include the other cells which include numbers.. H6,I6 - K6,L6 - N6,O6 - Q6,R6 - T6,V6 - W6,X6 or does it matter?

The MOD function in the first argument ensures that only target cells that meet the criteria are considered in the count.
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,243
Members
448,555
Latest member
RobertJones1986

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