Find a textstring in a named range and return the corresponding value from a column

Tresfjording

New Member
Joined
Dec 14, 2019
Messages
10
Office Version
  1. 365
Platform
  1. Windows
I want to search the named range "percent", and return the value in "branches".
Whatever I try with, xlookup, isnumber, index, match or countif, it just won't work
Not even Copilot solved this.
What am I doing wrong?
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Could you elaborate more on this? Any examples of what you're doing?
 
Upvote 0
mrexcel find cellvalue.xlsx
E
2#N/A
Sheet1
Cell Formulas
RangeFormula
E2E2=XLOOKUP(INDEX(percent,MATCH(D2,percent,0)),percent,C4:C11)
Named Ranges
NameRefers ToCells
Branches=Sheet1!$C$4:$C$11E2
percent=Sheet1!$D$4:$O$11E2
 
Upvote 0
You need to supply more info.
It would help if you could show a small sample of your data and expected results.
What's in your percent range?
What's the value in D2?
what's in cells C4:C11?

We have no idea what your data looks like and only showing a formula the gives an #N/A is of no real use.
 
Upvote 0
I am sorry abut that, but I really haven't a clue on how to attach a worksheet to a message.
I have downloaded and installed the Excel addon XL2bb, and uploaded a mini sheet, but that wasn't very useful, if I understand you right.
How can I attach a worksheet to a message here?
I figure there is a stupid and easy way that I have overseen.
Skjermbilde 2024-06-27 061910.png


Just in case, here is a link to the file: mrexcel find cellvalue.xlsx
Thanks for your time and effort.
Tresfjording
 
Upvote 0
Looking up numbers can be tricky. Is the number you're looking up match exactly in the percent range? They might look the same rounded but the stored value may not. Or are you looking for the next closest match?
 
Upvote 0
How about
Excel Formula:
=INDEX(Branches,AGGREGATE(15,6,ROW(Branches)-MIN(ROW(Branches))+1/(ROUND(percent,6)=D2),1))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,221,577
Messages
6,160,610
Members
451,657
Latest member
Ang24

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