Value dependent on non-blank (not empty) cell

Confuzzled_1

New Member
Joined
Jan 21, 2010
Messages
46
Hi all,

I have a sheet that has columns of numbers (lets say like below)
A1= 1500
A2= _
A3= _

Or

A1= _
A2= 1500
A3= _

They are all filled using formulas (lets say using a vlookup on another sheet).
They may sometimes be blank as shown in the examples above.
Only one will ever be populated with a number, but none of them will ever be 'empty' as they contain a formula, so 'BLANK' functions don't work here.

I need to return 'X' if A1 has a result in it, 'Y' if A2 has a result in it and 'Z' if A3 has a result in it.

Any brain waves?
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
73,443
Office Version
  1. 365
Platform
  1. Windows
How about
=IF(A1<>"","X",IF(A2<>"","Y","Z"))
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
73,443
Office Version
  1. 365
Platform
  1. Windows
In that case is the formula in A1 returning "", or something else?
 

Confuzzled_1

New Member
Joined
Jan 21, 2010
Messages
46

ADVERTISEMENT

It's returning "" or a value dependant on another cell (e.g. 1500 or such like)
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
73,443
Office Version
  1. 365
Platform
  1. Windows
Glad it's working & thanks for the feedback
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,651
Messages
5,838,576
Members
430,557
Latest member
MK15

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