Problem with IF function

tpeters752

New Member
Joined
Sep 2, 2002
Messages
2
Here is a sample of what I have and what the correct answer should be. I am trying to use the formula =IF(c2<>" ";c2;IF(b2<>" ";b2;a2))
Book1.htm
ABCD
1ColumnAColumnBColumnCcorrect
2MainStAprilStAprilSt
3ElmStBlueStBlueSt
4OakStOakSt
5MapleStGreenStMayStMaySt
Sheet1

This message was edited by tpeters752 on 2002-09-03 12:34
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
WELCOME TO THE BOARD!

Are you using semicolons or commas in your formula? You should be using commas.
 
Upvote 0
It appears you have a space between the quotation marks in your formula. A null cell is represented by "", not " ". Also, the semi colons may be correct if you are using a European version of Excel.

Another way to srite you formula would be

=If(NOT(ISBLANK(C2),C2,IF (NOT(ISBLANK(B2),B2,A2))
This message was edited by lenze on 2002-09-03 12:45
 
Upvote 0
On 2002-09-03 12:36, phantom1975 wrote:
WELCOME TO THE BOARD!

Are you using semicolons or commas in your formula? You should be using commas.

It depends on the List separator that's designated in Regional Settings control panel. A semicolon is a valid list separator for some regions of the world.
 
Upvote 0
Thanks for all your answers. I knew it was something simple. I just used "" for blank and the formula worked great. My list separator in regional settings is ; for another program. Another program I use needs " " to denote blank. That was where I got confused.
 
Upvote 0

Forum statistics

Threads
1,218,796
Messages
6,144,529
Members
450,551
Latest member
Mouse7681

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