count depending on...

Mike7

Board Regular
Joined
Dec 27, 2002
Messages
98
In column M I need to do count of three cells in the range B2K7. The range B1K1 - numbers of columns, where 1 is number for column B, 2 - for column C, etc. The range O2Q2 - numbers of columns I need to count.
I would like to automate it in the following way: when I put numbers of columns in range O2Q2 then in column M matching column letters will be counted.
Also O2Q2 numbers could be in one cell separated by comma.
Thanks.
Book1.xls
ABCDEFGHIJKLMNOPQR
112345678910
21245693259
321378100
43123781
544569102
651578101
76234692
8
Sheet1
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
It will be:

SUM(IF(HLOOKUP(O$2,$B:$K,$A2+1,FALSO)<>"",1,),IF(HLOOKUP(P$2,$B:$K,$A2+1,FALSE)<>"",1,),IF(HLOOKUP(Q$2,$B:$K,$A2+1,FALSE)<>"",1,))
 
Upvote 0
I restarted my computer and meantime is arrived barry houdini.
My compliments for the elegance of your formula.
 
Upvote 0
I could not get it working before I turned Italian "Falso" to English "False" :)
Big thanks too!
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

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