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?
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
46,578
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
46,578
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
46,578
Office Version
  1. 365
Platform
  1. Windows
Glad it's working & thanks for the feedback
 

Watch MrExcel Video

Forum statistics

Threads
1,109,424
Messages
5,528,682
Members
409,830
Latest member
KT50

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top