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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

phantom1975

MrExcel MVP
Joined
Jun 3, 2002
Messages
3,962
WELCOME TO THE BOARD!

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

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
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
 

Mark W.

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,654
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.
 

tpeters752

New Member
Joined
Sep 2, 2002
Messages
2
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.
 

Forum statistics

Threads
1,144,127
Messages
5,722,634
Members
422,450
Latest member
Springbok

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
Top