Returning A Value In A Cell Based On A Range

dely

New Member
Joined
Feb 3, 2025
Messages
2
Office Version
  1. 365
Platform
  1. Windows
On Sheet 2 in cell L2 I am trying to create a formula that will return the text from Sheet 1 Column B, based on if the text in cell L2 is within that range. I am open to any formula that may do this. As you can see I used a sequence formula on sheet 1 to expand my range, I then attempted to use a xlookup on Sheet 2, and get a value error. Please help me fix my value error, or suggest a new formula! There are approximately 1000 rows where I will using this, thank you!!!
 

Attachments

  • Sheet 2.jpg
    Sheet 2.jpg
    214.3 KB · Views: 10
  • Sheet 1.jpg
    Sheet 1.jpg
    205.9 KB · Views: 10

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
A vlookup should work for you since you do not have a lookup array (required for xlookups to cross reference).
=VLOOKUP(D2,Sheet2!F:N,1,FALSE)
 
Upvote 1
A vlookup should work for you since you do not have a lookup array (required for xlookups to cross reference).
=VLOOKUP(D2,Sheet2!F:N,1,FALSE)
That is not returning the anticipated response. I know that it should return 1100-1119, however it is returning a response of 99 which is elsewhere but incorrect
 
Upvote 0
Ah I was not sure what you wanted as your return value.
If there is additional columns past N that I cannot see in the screen shot please be sure to add them to the formula.
Try this
=VLOOKUP(D2,Sheet2!A:N,2,FALSE)
 
Upvote 1
How about
Excel Formula:
=TOCOL(IF(Sheet1!$H$2:$DC$41=D2,Sheet1!$B$2:$B$41,1/0),2)
 
Upvote 1
Solution

Forum statistics

Threads
1,226,266
Messages
6,189,935
Members
453,583
Latest member
Ok_category1816

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