Return closes adjacent text string in occupied cells

dunmore83

Well-known Member
Joined
Aug 24, 2011
Messages
540
I have three columns - lets say A B C. Under these columns there is text in some but not all the cells. In column D I want the text string from the closest occupied cell.

For example if row 1 has text in B1 then that value goes into D1.... if row 2 only hast text in A2 (none in B2 or C2) then the text string in A2 goes into D2.

Any helpers for a formula? Thanks
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Will only 1 cell in the three have contents? If not, which cell do you want returned?

=IF(A1="",if(B1="",C1,B1),A1) will check A1 1st, then B1, then C1
 
Upvote 0

Forum statistics

Threads
1,225,608
Messages
6,185,960
Members
453,333
Latest member
BioCoder84

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