select column base on criteria

D

doggies

hi, is there anyway that I could select a whole column base on a
criteria so that I can count the cells that contain >0 in that column?

eg
abc def ghi
1 7
2 5 8
3 6 9

for criteria=def, column 2 is selected and 2 will be returned.

tks
 
J

JE McGimpsey

One way:

Assuming your column headers are in row 1 (array-entered:
CTRL-SHIFT-ENTER or CMD-RETURN):

=COUNT(IF(OFFSET(A1,1,MATCH(crit,1:1,FALSE)-1,65535,1)>0,OFFSET(A1,1,MATC
H(crit,1:1,FALSE)-1,65535,1),""))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

array search 8
Arriving at totals 2
Multiples conditions in an array 3
Help creating a formula 15
Lookup Wizard 4
Paragraph numbering in Word 1
Critical Counitif formula 3
index and match on 2 criteria 5

Top