IsBlank then return other field content

logically

New Member
Joined
Feb 12, 2013
Messages
2
I have a situation where I have 3 columns of data and in a four column I need to evaluate the data in the 1st 3 column in steps and return a result in column 4.

I will refer the cells as A2, B2,C2, D3 where the following values are populated 10abc,Blank,Blank
The logical steps required

If C2 not null, then D2="L3 "+C2
Else If B2 not null, then D2 ="L2 "B2
Else D2= A1

The result in cell D2 based on the sample data should return L1 10abc

Another examples with values Blank, 12abc, Blank


If C2 not null, then D2="L3 "+C2
Else If B2 not null, then D2 ="L2 "B2
Else D2= A1

For this example the exepted result in D2 should be L2 12abc

I am tired here so I hope my example of the scenerio means sense to all and that someone can help me.

Many thanks in advance to all.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
This should do the trick :)

Code:
[TABLE="width: 594"]
<tbody>[TR]
[TD]10abc[/TD]
[TD][/TD]
[TD][/TD]
[TD]L1 10abc[/TD]
[TD]=IF(C2<>"","L3 "&C2,IF(B2<>"","L2 "&B2,"L1 "&A2))[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]12abc[/TD]
[TD][/TD]
[TD]L2 12abc[/TD]
[TD]=IF(C3<>"","L3 "&C3,IF(B3<>"","L2 "&B3,"L1 "&A3))[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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