Help with Combination of Vlookup, Hlookup and Index's

Mkammari

Board Regular
Joined
Nov 23, 2005
Messages
65
On a userform, I am trying to have a text box automatically populate based on 3 drop down boxes. I am not sure what kind of method would work best and I have not been able to get this to work. Here is my dilema.

Drop down box 1......Ship From Location
Drop Down box 2......Ship to Location
Drop Down box 3......Weight
TxtFreightDollars....(answer I am seeking)


In the text box I am looking for a return value based on a worksheet I have set up for Freight values. The data is set up like this on my worksheet

Ship from Location Range A11:A148
Ship to Location Range B11:B148
Weights Range C10:V10
Freight Dollars Range C11:V148 (This is the value I want returned)

So in summary. I need a freight value returned based on three conditions (Ship From, Ship To, and Weight). The value will automatically populate in a text box. Hope this is all clear.

Michael
[/url]
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Michael

You don't really need any of those functions for this as far as I can see.

The 3 dropdowns will return ListIndexs which you could use to get a value from the Freight Dollars Range.

It all really depends how that range is set up.

Where are the locations, weights etc?

Can you post an example of the data and required result, perhaps using Colo's HTML Maker?
 
Upvote 0
Norie....I am getting an error when I try to convert the sheet to html stating "Compile error, cannot find project library"...should I download again.
 
Upvote 0
The data is set up similiar to an x-y type format. I'll type an example of it below



weights
100 200 300 400 500

ShipFrom Ship To
Texas Maine 400 600 500 600 700
Californ. Arizona 400 900 700 400 300


Ship from is in Colum a..range a11:A148
Ship To is in colum b range B11:B148
weights are in column c7 thru colum v7:

The freight dollars are in range C8 thru v148

The are all defined in a list called freight.

Teh
 
Upvote 0
Hi,

Try:

=INDEX(C5:G8,MATCH(J2&"@"&J3,A5:A8&"@"&B5:B8,0),MATCH(J4,C2:G2))
This formula needs to be confirmed with Ctrl + shift + enter.

Note that I changed the weights to enable an easier formula.

0 in C2 means 0 to 99.99999999 Kg
100 in D2 means 100 to 199.99999999 Kg

etc.
Book2
ABCDEFGHIJK
1weights
20100200300400FromCaliforn.
3ToArizona
4ShipFromShipToWeight350
5TexasMaine400600500600700Result90
6TexasArizona400900700400300
7Californ.Maine1020304050
8Californ.Arizona60708090100
9
Sheet2
 
Upvote 0
I was so excited..but it returned a #Value.

But the layout is precisely what I am working with.
 
Upvote 0
Norie...if you're out there. The layout that is provided by the person who attempted to help me is exactly how my spreadsheet is set up.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

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