VLOOKUP AND COUNTIF

J

JLP

CAN YOU DO A VLOOKUP AND HAVE IT COUNT THE NUMBER OF 1's THAT ARE IN THE ROW, INSTEAD OF GOING TO A COLUMN # AND GIVING THIS ANSWER? I NEED IT TO GIVE THE NUMBER OF 1's IN THE NEXT 20 COLUMNS AFTER IT DOES ITS LOOKUP IN A TABLE.

THANKS
 
F

Frank Kabel

Hi
first please turn off your CAPS lock.

For your question. Try the following formula
=COUNTIF(OFFSET($B$1,MATCH(lookup_value,$A$1:$A$100,0)-1,0,1,20),1)

--
Regards
Frank Kabel
Frankfurt, Germany

JLP said:
CAN YOU DO A VLOOKUP AND HAVE IT COUNT THE NUMBER OF 1's THAT ARE IN
THE ROW, INSTEAD OF GOING TO A COLUMN # AND GIVING THIS ANSWER? I NEED
IT TO GIVE THE NUMBER OF 1's IN THE NEXT 20 COLUMNS AFTER IT DOES ITS
LOOKUP IN A TABLE.
 
J

jlp

Can you please explain what exactly this will be doing, so I can improvise upon it

Thanks
 
J

jlp

If I have the following, how would I tell a cell to look-up paul in a table and count the number of 1's to the right of it.

jack 1 2 1 4 1
joe 7 4 3 3 1
paul 6 1 1 1 1
nancy 5 5 5 5 5
jill 1 1 2 2 8

Thanks again
 
F

Frank Kabel

Hi
then use
=COUNTIF(OFFSET($B$1,MATCH("paul",$A$1:$A$100,0)-1,0,1,20),1)

--
Regards
Frank Kabel
Frankfurt, Germany

jlp said:
If I have the following, how would I tell a cell to look-up paul in a
table and count the number of 1's to the right of it.
 
Top