Countif and Vlookup in a single formula

P

pol

I given the following formula as one
=IF(COUNTIF([item.xls]Sheet1!B:B,G7),VLOOKUP(G7,[item.xls]Sheet1!B:L,11,0),0)

If there is no record matching with item.xls, the result should be 0
otherwise the result will be 11th column. But it working fine except if there
is no record to match it is not giving the result as 0 in G7. Please help
 
J

Jim Thomlinson

Have you confirmed that you do not have a data type mismatch. Looking for a
number is a list of text values or vice versa. Countif will find the match
but vlookup won't.
 
P

pol

Thanks for the reply

No datatype mismatch . Both column are text column

Jim Thomlinson said:
Have you confirmed that you do not have a data type mismatch. Looking for a
number is a list of text values or vice versa. Countif will find the match
but vlookup won't.
--
HTH...

Jim Thomlinson


pol said:
I given the following formula as one
=IF(COUNTIF([item.xls]Sheet1!B:B,G7),VLOOKUP(G7,[item.xls]Sheet1!B:L,11,0),0)

If there is no record matching with item.xls, the result should be 0
otherwise the result will be 11th column. But it working fine except if there
is no record to match it is not giving the result as 0 in G7. Please help
 

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

Top