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..
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
19,406
Try...

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

Mykro

Active Member
Joined
Oct 17, 2002
Messages
337
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?
 

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
19,406
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,705
Messages
5,597,663
Members
414,162
Latest member
jborjal1967

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
Top