ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF a number then.... (https://www.excelbanter.com/excel-worksheet-functions/29794-if-number-then.html)

jeremy via OfficeKB.com

IF a number then....
 
This function works for me =IF(B44000, 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".

--
Message posted via http://www.officekb.com

N Harkawat

=if(isnumber(b4),vlookup(....),"S")

"jeremy via OfficeKB.com" wrote in message
...
This function works for me =IF(B44000, 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".

--
Message posted via http://www.officekb.com




Ron de Bruin


Hi jeremy

Look in the help for the ISNUMBER worksheetfunction


--
Regards Ron de Bruin
http://www.rondebruin.nl


"jeremy via OfficeKB.com" wrote in message ...
This function works for me =IF(B44000, 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".

--
Message posted via http://www.officekb.com




Bernard Liengme

Try =IF(AND(ISNUMBER(B4),B44000), VLOOKUP(B4,table-ref,2), "S")
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email


"jeremy via OfficeKB.com" wrote in message
...
This function works for me =IF(B44000, 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".

--
Message posted via http://www.officekb.com




jeremy via OfficeKB.com

Thanks guys....

--
Message posted via http://www.officekb.com

jeremy via OfficeKB.com

HEY THANKS

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

=IF(ISNUMBER(B7),(IF(B74000, 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

--
Message posted via http://www.officekb.com


All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com