Returning a Figure from Adjacent Cells

ericarenzo

New Member
Joined
Dec 9, 2009
Messages
2
I have 8 columns in my excel grid (CJ - CQ), each showing the number of people enrolled each year (2001 - 2008). Ideally I would have a number of enrollees in column 2008 (most recent enrollment) for each line, however some lines do not have a figure in the 2008 column. I would like to create a formula that will look in the 2008 column first (CQ), and if there is a figure there return that figure. If there is no figure in the 2008 column, I would like it to look in the 2007 column (CP) and return that figure, and so on back to the 2001 column (CJ) if necessary. Is this possible?
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Expiry

Well-known Member
Joined
Jun 20, 2007
Messages
865
I'm sure someone will provide a neater way of achieving this, but this works if your blank cells are really blank. if they have 0s in them, change the ""s to 0s in the formula.


=IF(CQ2="",IF(CP2="",IF(CO2="",IF(CN2="",IF(CM2="",IF(CL2="",IF(CK2="",CJ2,CK2),CL2),CM2),CN2),CO2),CP2),CQ2)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,370
Messages
5,595,768
Members
414,017
Latest member
surajks

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