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

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
=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,214,835
Messages
6,121,880
Members
449,057
Latest member
Moo4247

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