ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help with IF function (https://www.excelbanter.com/excel-worksheet-functions/41513-help-if-function.html)

Jim

Help with IF function
 
Hi Everyone.

I am using Excel 2000.

I have an IF formula. It first looks to see if J160. If it is, I want it to
look at B16 and see if there is any number including zero (0) in the cell. If
there is, it is to use B16, if not it is to use cell A16.

If I use IF(B16=0), it returns true even if B16 is empty or blank. When B16
is empty or blank, I need the formula to go to A16.

Can someone help?
Thanks
--
Jim

CLR

Maybe..........

=IF(J16<=0,"undefined",IF(B16="",A16,B16))

Vaya con Dios,
Chuck, CABGx3



"Jim" wrote in message
...
Hi Everyone.

I am using Excel 2000.

I have an IF formula. It first looks to see if J160. If it is, I want it

to
look at B16 and see if there is any number including zero (0) in the cell.

If
there is, it is to use B16, if not it is to use cell A16.

If I use IF(B16=0), it returns true even if B16 is empty or blank. When

B16
is empty or blank, I need the formula to go to A16.

Can someone help?
Thanks
--
Jim




Peo Sjoblom

One way

=IF(AND(J160,ISNUMBER(B16)),B16,A16)

if B16 can be negative and in that case you should want A16 as result add a
third
part in the AND function B16=0

--
Regards,

Peo Sjoblom

(No private emails please)


"Jim" wrote in message
...
Hi Everyone.

I am using Excel 2000.

I have an IF formula. It first looks to see if J160. If it is, I want it
to
look at B16 and see if there is any number including zero (0) in the cell.
If
there is, it is to use B16, if not it is to use cell A16.

If I use IF(B16=0), it returns true even if B16 is empty or blank. When
B16
is empty or blank, I need the formula to go to A16.

Can someone help?
Thanks
--
Jim



Biff

Hi!

Try this:

IF(AND(J160,ISNUMBER(B16)),B16,A16)

Biff

"Jim" wrote in message
...
Hi Everyone.

I am using Excel 2000.

I have an IF formula. It first looks to see if J160. If it is, I want it
to
look at B16 and see if there is any number including zero (0) in the cell.
If
there is, it is to use B16, if not it is to use cell A16.

If I use IF(B16=0), it returns true even if B16 is empty or blank. When
B16
is empty or blank, I need the formula to go to A16.

Can someone help?
Thanks
--
Jim




Ashish Mathur

Hi,

Try this - IF(J160,IF(ISNUMBER(B16),B16,A16))

Regards,

Ashish Mathur

"Jim" wrote:

Hi Everyone.

I am using Excel 2000.

I have an IF formula. It first looks to see if J160. If it is, I want it to
look at B16 and see if there is any number including zero (0) in the cell. If
there is, it is to use B16, if not it is to use cell A16.

If I use IF(B16=0), it returns true even if B16 is empty or blank. When B16
is empty or blank, I need the formula to go to A16.

Can someone help?
Thanks
--
Jim



All times are GMT +1. The time now is 08:16 PM.

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