IF Funtion

brett4098

New Member
Joined
Jan 6, 2004
Messages
16
How would I formulate "if (cell) has a number, then do this.
IF(C1=any number, then do this, else do this)?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
=IF(C1, "It's a number", "It's not a number")

OR, if the cell can also contain TEXT other than just being blank, then:

=IF(ISNUMBER(C1), "It's a number", "It's not a number")
 
Upvote 0
tbardoni said:
=IF(C1, "It's a number", "It's not a number")

Todd,

The idiom "IF(C1" holds when what we deal with is a number (either zero or non-zero).

If the 'numberness' is the issue, we need either...

=IF(ISNUMBER(C1), X, Y)

or

=IF(N(C1), X, Y)

The last one is less generic, that is, it only distinguishes between text and number on the one hand and zero and non-zero on the other hand.
 
Upvote 0

Forum statistics

Threads
1,215,326
Messages
6,124,272
Members
449,149
Latest member
mwdbActuary

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top