Hlookup or index match?

Noxqss38242

Board Regular
Joined
Sep 15, 2017
Messages
225
Office Version
  1. 2016
BREAKDOWN-DOWNTIME.xls
AB
66Indianapolis Occupied
67UNITDAYS
68
69
70
71Terminal Vendors Occupied
72UNITDays at Vendor
73
74205793
75
76Road Repairs Occupied
77UNITDAYS
782025110
79168547
80168267
81203612
82207202
83169122
84
85Murray Shop Empty
86UNITDAYS
872082162
882049753
892039149
902025549
911685239
922051539
932086637
941680736
952052935
962052534
Sheet1
Cell Formulas
RangeFormula
B74B74=TODAY()-R74
B87:B96,B78:B83B78=$J$1-R78


This is a sample of data I need to pull.
On another sheet, I want to pull the unit numbers of "Road Repairs Occupied" so it lists it:
20251
16854
16826
20361
20720
16912

Considering the index and match function are the same column, I'm having difficulties with that. Any solutions?
It also has to stop lookup up values (unit numbers) once a blank space is detected. As you can also see, sometimes they leave the blank in the first cell as is the case with "Terminal Vendors Occupied", if I were to search for that, I would want it to pull 20579 but stop after the first blank so to not pull the units for "Road Repairs Occupied".

Hopefully the formula is adjustable enough for me to change it to any condition, ie: "Murray Shop Empty", "Road Repairs Occupied", etc...


Thank you in advance!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
That is not really a formula compatible format. This works, but I would be reluctant to call it a solution.
The formula in E66 finds the criteria specified, the formula in F66 counts the number of rows to return on the assumption that the layout is consistent with the example provided.
It only allows for one empty row at the end of each data block, any other empty rows will show zeros in the results.
Book1
ABCDEF
66Indianapolis OccupiedMurray Shop Empty8511
67UNITDAYSUNITDAYS
682082162
692049753
702039149
71Terminal Vendors Occupied2025549
72UNITDays at Vendor1685239
732051539
742057932086637
751680736
76Road Repairs Occupied2052935
77UNITDAYS2052534
782025110  
79168547
80168267
81203612
82207202
83169122
84
85Murray Shop Empty
86UNITDAYS
872082162
882049753
892039149
902025549
911685239
922051539
932086637
941680736
952052935
962052534
Sheet3
Cell Formulas
RangeFormula
E66E66=MATCH(D66,A:A,0)
F66F66=IFERROR(MATCH("UNIT",INDEX(A:A,E66+2):INDEX(A:A,10000),0)-2,MATCH(1E+100,A:A)-E66)
D67:E78D67=IF(ROWS(D$67:D67)>$F$66,"",INDEX($A:$B,ROWS(D$67:D67)+$E$66,COLUMNS($D67:D67)))
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,179
Members
453,021
Latest member
Justyna P

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