Vlookup to show a range

Jschoonz

New Member
Joined
Apr 6, 2022
Messages
2
Office Version
  1. 2021
Platform
  1. Windows
Having to use Vlookup: I want to to get Tab A in the POST column to show the result in Tab B Size Column so I don't get a #NA
Tab A
Column A Column B
Number of shirtsPOST
0-<80Short
80-<160Medium
160->260Large

When entering a number in Column A the Forumula in Column B returns a #NA. I need to to return the POST from Tab A Column B
Tab B
Column A Column B
Number of ShirtsSizes
55#NA (This should have returned result - SHORT) be I entered 55. Had I Entered 90 it should return Medium etc
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Welcome to the Board!

Your lookup table needs to contain the LOWER value of the range in a column by itself (0, 80 and 160), and that is the value you match on.
Then, be sure that you use the Approximate Match argument in the VLOOKUP formula.
 
Upvote 0
Welcome to the Board!

Your lookup table needs to contain the LOWER value of the range in a column by itself (0, 80 and 160), and that is the value you match on.
Then, be sure that you use the Approximate Match argument in the VLOOKUP formula.
Thanks Joe4, That's what I thought (single value), but the instructors book they wanted the the data table in Tab A formatted like 0-<80 and so on... I think I have a work around where I can show the table she wants with the results.
 
Upvote 0
Thanks Joe4, That's what I thought (single value), but the instructors book they wanted the the data table in Tab A formatted like 0-<80 and so on... I think I have a work around where I can show the table she wants with the results.
The issue is that "0=<80" is a string, and not a value, so you really cannot use that in a VLOOKUP unless you had an exact match (and were trying to look up exactly "0=<80").
Note that when using VLOOKUP, the value that you are looking up and the column that you are matching on must be the EXACT same data type.
You cannot compare text-to-number or number-to-text. It has to be number-to-number or text-to-text.
(This is one of the most common issues people have with it not working, when they are trying to compare a number entered as text to an actual number).
 
Upvote 0

Forum statistics

Threads
1,215,480
Messages
6,125,047
Members
449,206
Latest member
Healthydogs

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