Formula to find a value by going right, down, and then left.

lpomykal

New Member
Joined
Dec 8, 2016
Messages
7
Office Version
  1. 365
Platform
  1. Windows
I am looking for a formula that will find the value in cell B1 in the row B5:I5. Then go down from that date to the first non-blank cell. Then go left and return the corresponding value/name in column A6:A12 into cell F1.

Thanks in advance. I have been racking my head trying to figure this out. I was using =INDEX($A$6:$A$12,SMALL(IF($H$6:$H$12<>"",ROW($H$6:$H$12)-ROW($H$6)+1),ROW(A1))) to find the nth non-blank cell and return the corresponding name, but that requires the column to be called out in the IF formula. For this I tried to use =MATCH(B1,B5:I5,0). This just gives me the column number within the range. I can't figure out how to combine the two formulas (if that is even possible).
Capture.JPG
 
You're welcome. :)


I would advise to always use a ROWS() construct, referencing the row(s) that the formula is in. With your method if any row(s) are subsequently inserted at the top of the sheet the sequence will become 2, 3, 4, ... or 7, 8, 9, .. rather than always being 1, 2, 3, ... & the formula involved will return incorrect results (which may not always be obvious).
Makes sense. I have had that problem before but didn’t know ROW() would not recognize new rows.
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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