Reading from multiple previous columns, without nested if?

gmort

New Member
Joined
Jan 31, 2014
Messages
2
Hi all,

Thanks for contributing to this forum, it's been a huge help during this project I've been working on. Unless I'm missing something obvious, it seems that I've stumbled across a new, unanswered question. Is there a technique to create a column which chooses one cell value from multiple previous columns, with the choosing method predetermined? That's a bit convoluted.

Specifically, I'm trying to create a column which will copy prices from four previous columns, each with their own pricing methodology.

A B C D E

Where D is the column which reads from the previous columns. Every row in column A contains values, and serves as the default go-to column. Columns B, C and D contain preferred (price) values, with many gaps. Where there are gaps, column D should read from the default A column. Where unique prices appear in columns B, C or D, it should read those.

A few nested if statements can do the job, such as..
D=if(B<>"", B, if(C<>"", C, A)...but this is plain ugly.

Thank you all for any ideas!
Garth
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi, WELCOME to the Board!

Try something like this:
=LOOKUP(9.99999999999999E+307,A2:C2)

kind regards,
Erik

EDIT: you can replace the very big number by something which suits your needs like 100000 (a number which will never be reached)
 
Upvote 0

Forum statistics

Threads
1,214,780
Messages
6,121,527
Members
449,037
Latest member
tmmotairi

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