Look for nearest column to the right that contains data

Minglee

New Member
Joined
Jun 1, 2020
Messages
2
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I need to add a formula in Column B that looks for the nearest column containing data to the right of Column B, and then pulls that data into the Column B cells.
For reference: Cell B2 should return the date from C2, Cell B3 should return the data from D3 (as C3 is blank). Is this an Index formula, or ?

1591056499488.png
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Its long winded but this should work - =IF(ISBLANK(C2),IF(ISBLANK(D2),IF(ISBLANK(E2),IF(ISBLANK(F2),IF(ISBLANK(G2),IF(ISBLANK(H2),"Error",H2),G2),F2),E2),D2),C2)
 
Upvote 0
Try:
This is an array formula that must be entered with CTRL-SHIFT-ENTER.

Book1
ABCDEFG
1
255101525
3222268
412122814
Sheet4
Cell Formulas
RangeFormula
B2:B4B2=INDEX($C2:$M2,MATCH(FALSE,ISBLANK(C2:M2),0))
 
Upvote 0
You're welcome. Thanks for the feedback and welcome to the forum.
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,700
Members
448,979
Latest member
DET4492

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