Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have a spreadsheet like this

origin zip low dest zip high dest zip value
33625 30000 31000 50
33625 31000 32000 40
33625 32000 33000 30
33625 33000 34000 20

I would like to enter the origin zip of 33625 and destination zip 33777 and have it check to see if my dest zip fall in between the range of the low dest zip and high dest zip and return the value of 20. so its 2 criteria, it has to match the origin zip and dest zip needs to fall in between the low and high zip to return me a specific value. I know Im make a dumb mistake somewhere.



Thanks for all of the help in advance
Posted

1 solution

If the four columns are A, B, C, and D, and the rows are 1 thru 5, with header, then "=VLOOKUP(33777,B2:D5,3)" should give you your answer.

VLOOKUP finds the number if the table B2 to D5 and returns the value in the 3rd column in this case. The second column is meaningless since your first column already splits the zipcodes into ranges.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900