Flave
New Member
- Joined
- Jul 14, 2015
- Messages
- 13
Hi all, first post here and I’m struggling with this and would really appreciate any help. I’ll be very impressed if anyone can help me use a formula or another non-VBA technique to solve.
I have two tables to run the lookup from – one actual and one with a variable linking to the reference table. There are three variables which dictate this and step 1: these need to be matched such that -
condition1, condition2 and condition3 are all met.
[TABLE="width: 343"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Table 1
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]x
[/TD]
[TD]y
[/TD]
[TD]z
[/TD]
[TD]variable
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]condition1
[/TD]
[TD]condition2
[/TD]
[TD]condition3
[/TD]
[TD]50
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 343"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Table 2
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]x
[/TD]
[TD]y
[/TD]
[TD]z
[/TD]
[TD]bracket
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]condition1
[/TD]
[TD]condition2
[/TD]
[TD]condition3
[/TD]
[TD]100
[/TD]
[/TR]
</tbody>[/TABLE]
Table 2 gives the bracket (explained below) and table 1 gives a value to match. The value I want returned has a problem:
So I have the following table, the reference table, which denotes pricing brackets, the ‘bracket’ means the MAX value which corresponds to the right column
[TABLE="width: 131"]
<tbody>[TR]
[TD]Bracket
[/TD]
[TD]Value
[/TD]
[/TR]
[TR]
[TD]15
[/TD]
[TD]100
[/TD]
[/TR]
[TR]
[TD]20
[/TD]
[TD]250
[/TD]
[/TR]
[TR]
[TD]25
[/TD]
[TD]280
[/TD]
[/TR]
[TR]
[TD]30
[/TD]
[TD]300
[/TD]
[/TR]
[TR]
[TD]35
[/TD]
[TD]460
[/TD]
[/TR]
[TR]
[TD]40
[/TD]
[TD]500
[/TD]
[/TR]
[TR]
[TD]50
[/TD]
[TD]650
[/TD]
[/TR]
[TR]
[TD]60
[/TD]
[TD]700
[/TD]
[/TR]
[TR]
[TD]70
[/TD]
[TD]800
[/TD]
[/TR]
[TR]
[TD]75
[/TD]
[TD]850
[/TD]
[/TR]
[TR]
[TD]80
[/TD]
[TD]900
[/TD]
[/TR]
[TR]
[TD]100
[/TD]
[TD]1000
[/TD]
[/TR]
</tbody>[/TABLE]
So e.g. in a vlookup scenario, ‘20’ in the left column means all numbers <= 20 so ‘1’ can return 250, and similarly ‘100’ means all numbers <=100, so ‘1’ could also return 1000. To be clear, the information in this table/this bracket system cannot be changed.
Taking the above Table 1/Table 2 example, I want to know how I would get the lookup to return 1000 (from the reference table) as the value for ‘50’ in Table 1 (rather than 650 from the reference table).
So the way I’ve tried it is to concatenate the three conditions x, y and z on both tables and try to vlookup (with ‘TRUE’) from there. What I need is for the variable to be picked up and correctly matched to the reference table but I just can’t get it right!
Any ideas?
I have two tables to run the lookup from – one actual and one with a variable linking to the reference table. There are three variables which dictate this and step 1: these need to be matched such that -
condition1, condition2 and condition3 are all met.
[TABLE="width: 343"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Table 1
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]x
[/TD]
[TD]y
[/TD]
[TD]z
[/TD]
[TD]variable
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]condition1
[/TD]
[TD]condition2
[/TD]
[TD]condition3
[/TD]
[TD]50
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 343"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Table 2
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]x
[/TD]
[TD]y
[/TD]
[TD]z
[/TD]
[TD]bracket
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]condition1
[/TD]
[TD]condition2
[/TD]
[TD]condition3
[/TD]
[TD]100
[/TD]
[/TR]
</tbody>[/TABLE]
Table 2 gives the bracket (explained below) and table 1 gives a value to match. The value I want returned has a problem:
So I have the following table, the reference table, which denotes pricing brackets, the ‘bracket’ means the MAX value which corresponds to the right column
[TABLE="width: 131"]
<tbody>[TR]
[TD]Bracket
[/TD]
[TD]Value
[/TD]
[/TR]
[TR]
[TD]15
[/TD]
[TD]100
[/TD]
[/TR]
[TR]
[TD]20
[/TD]
[TD]250
[/TD]
[/TR]
[TR]
[TD]25
[/TD]
[TD]280
[/TD]
[/TR]
[TR]
[TD]30
[/TD]
[TD]300
[/TD]
[/TR]
[TR]
[TD]35
[/TD]
[TD]460
[/TD]
[/TR]
[TR]
[TD]40
[/TD]
[TD]500
[/TD]
[/TR]
[TR]
[TD]50
[/TD]
[TD]650
[/TD]
[/TR]
[TR]
[TD]60
[/TD]
[TD]700
[/TD]
[/TR]
[TR]
[TD]70
[/TD]
[TD]800
[/TD]
[/TR]
[TR]
[TD]75
[/TD]
[TD]850
[/TD]
[/TR]
[TR]
[TD]80
[/TD]
[TD]900
[/TD]
[/TR]
[TR]
[TD]100
[/TD]
[TD]1000
[/TD]
[/TR]
</tbody>[/TABLE]
So e.g. in a vlookup scenario, ‘20’ in the left column means all numbers <= 20 so ‘1’ can return 250, and similarly ‘100’ means all numbers <=100, so ‘1’ could also return 1000. To be clear, the information in this table/this bracket system cannot be changed.
Taking the above Table 1/Table 2 example, I want to know how I would get the lookup to return 1000 (from the reference table) as the value for ‘50’ in Table 1 (rather than 650 from the reference table).
So the way I’ve tried it is to concatenate the three conditions x, y and z on both tables and try to vlookup (with ‘TRUE’) from there. What I need is for the variable to be picked up and correctly matched to the reference table but I just can’t get it right!
Any ideas?