IF a number then....

  • Thread starter jeremy via OfficeKB.com
  • Start date
J

jeremy via OfficeKB.com

This function works for me =IF(B4>4000, VLOOKUP(B4,Sheet1!#REF!,2), "S")

but I need to and an IF statment in front:

IF(B4=#,(function above), "S")

In other words, only if it is a number, if not a number, then "S".
 
B

Bernard Liengme

Try =IF(AND(ISNUMBER(B4),B4>4000), VLOOKUP(B4,table-ref,2), "S")
best wishes
 
J

jeremy via OfficeKB.com

HEY THANKS

This funtion works for me, if there are no letters behind numbers

=IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")

but some of the numbers have a letter or two behind them or an apostrophy
in front, which I want to
ignore (eg. 4123HG i want to recognize as 4123)....

jeremy
 
Top