Function COUNTA for alternate cells in a row

sinecdoque

New Member
Joined
Jul 20, 2011
Messages
3
Hello,

Maybe this has been asked before but I have a problem with counting cells containing text in alternate columns.
I tried using COUNTA, but then I cannot choose which cells to count. I also tried COUNTIFS(F7:P7,"xxx",F9:P9,"<>0") "xxx" being the title of the columns which I want to be counted. But this function returns the number of times the cells under the title "xxx" are repeated even if they are blank.

Thanks in advance for your help
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
If you are counting cells with text only in columns G, I, K, M, and O, the following will work:

Code:
=SUMPRODUCT(--(MOD(COLUMN(F9:P9),2)=1),--(ISTEXT(F9:P9)))
 
Upvote 0
Thanks both of you for your quick answers.

In the end, I'll go with MikeWx proposal which is precisely what I was looking for.

Cheers!
 
Upvote 0
I know I said the solution you gave me worked perfectly, and it does. The only problem is I have three columns to analyse instead of two, so I changed 2 to 3:

=SUMPRODUCT(--(MOD(COLUMN(F9:P9),3)=1),--(ISTEXT(F9:P9)))

And it works for the first two columns but not for the third

=SUMPRODUCT(--(MOD(COLUMN(F9:P9),3)=3),--(ISTEXT(F9:P9)))

Could you tell me what I am doing wrong? Thank you
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,814
Members
452,945
Latest member
Bib195

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