Dear Experts,
Please see my attached excel file I required crossing before and after TP No.
CROSSINGS TP LOCATION.xlsx
Dear Experts,
Please see my attached excel file I required crossing before and after TP No.
CROSSINGS TP LOCATION.xlsx
In G3
=INDEX($A$3:$A$23,MATCH($H3,$B$3:$B$23,1))
in I3
=INDEX($A$3:$A$23,MATCH($J3,$B$3:$B$23,1))
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
Thank you for your reply, @JohnTopley.
I think I have caused some confusion. What I actually want is to find crossings before and after the TP number. Your formula returns results based on column H, but please note that columns H and J do not exist in my Excel sheet.
please see attached file
Use the same formula but match against the "Chainage" value in column E rather than the "TP" value
See attached
Please see the revised excel file.
You have a reply on this in Post #5
Sorry for the late reply. I tried using the fifth solution, but it gave me the correct answer before TP, but the result after TP was wrong.
Hi.
Is your forum profile showing the Excel PRODUCT that you need this request to work with? With XLOOKUP, you are NOT using Excel 2013.
The best solutions often rely on knowing WHICH Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date. If you aren't sure, in Excel go to File/Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this.
The three most recent Excel PRODUCTS are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the Version number in your profile (e.g. MS365 (PC) Version 2211). The version number is in the About Excel section further down the Account page.
Cheers,
Glenn.
Glenn
None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU
The results in the file in post #5 match your manual results so formula is not going to error in another file.
IF you have O365, delete ALL expected result and use...
=LET(A,A3:A23,B,B3:B23,E,E3:E8,HSTACK(BYROW(E,LAMBDA(x,TAKE(FILTER(A,B<=x),-1))),BYROW(E,LAMBDA(x,TAKE(FILTER(A,B>=x),1)))))
no copy paste.
Thanks, Glenn Kennedy. Based on your Excel file, the result is correct. However, I do not have Office 365; instead, I have Office 2021. When I try to drag the formula, I receive a #NAME? error.
It will not work in Excel 2021. Give me a few minutes. While I am looking at it... pleas eupdate your profile.
Try:
=INDEX(A:A,AGGREGATE(14,6,ROW($B$3:$B$23)/($B$3:$B$23<=E3),1))
and
=INDEX(A:A,AGGREGATE(15,6,ROW($B$3:$B$23)/($B$3:$B$23>=E3),1))
both copied down.
Thank You, according to your formula result is correct.
![]()
I've asked you to update your profile. Please do so... you'll get pestered to check your profile endlessly... if your Excel product looks a biy elderly.
Okay, I have Updated My profile.
Thanks For the Info.
If you are using Excel 2021, then you can use the XLOOKUP function.
BEFORE TP =XLOOKUP($E3,$B$3:$B$23,$A$3:$A$23,,-1,1)
AFTER TP =XLOOKUP($E3,$B$3:$B$23,$A$3:$A$23,,1,-1)
Thank You, according to your formula result is correct.
![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks