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?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
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)
 
Upvote 0

Forum statistics

Threads
1,214,867
Messages
6,122,002
Members
449,059
Latest member
mtsheetz

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