# problem with if thens and vlookup

#### RAMatgreenleaf

##### Board Regular
i have a spreadhset which i have 3 macro buttons on them
for 3 diff brands

EPhenry
Tech
Imperial

when i put the macro button next to each brand it puts a value in p7 and then changes a drop down menu with sub products under the brand

the drop down is in g6

=IF(G6="","",IF(P7="EPHenry",VLOOKUP(G6,P28:Q43,2,0),IF(P7="Techo Block",VLOOKUP(G6,S28:T51,2,0),IF(P7="Imperial",VLOOKUP(V28:W36,2,0)))))

this is what i have for a cell C9
when you select the brand it puts the name in P7
when you select the drop down product in G6 it then uses vlookup to find the price that does with that product

now i had it working all fine with 2 brands
as soon as i threw the 3rd in there i am having a problem
is there a limit to the amount you can have?

### Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

#### texasalynn

##### Well-known Member
looks like on the third one you left off the 1st part of formula
=IF(G6="","",IF(P7="EPHenry",VLOOKUP(G6,P28:Q43,2,0),IF(P7="Techo Block",VLOOKUP(G6,S28:T51,2,0),IF(P7="Imperial",VLOOKUP(G6,V28:W36,2,0)))))

##### Well-known Member
Hello,

Your last VLOOKUP hag (G6, missing

#### RAMatgreenleaf

##### Board Regular
THANK YOU

ive been trying to get it to work since fri

something so mall its easy to overlook but so important to have

thank you all

Replies
25
Views
750
Replies
5
Views
610
Replies
1
Views
389
Replies
6
Views
359
Replies
4
Views
582

1,195,595
Messages
6,010,632
Members
441,558
Latest member
lambierules

### 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?

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