Possible Nested Vlookup

geospatial

Active Member
Joined
Sep 2, 2008
Messages
290
I am using Excel 2007 along with xcelsius. I have 2 drop down menus. One contains the months of the year and the other contains 7 states. When I choose January it puts a "1" in A1, february a "2" in A1 and so on. For my 7 states it does the same thing except puts a number in B1. So for missouri it would be a "1" in B1 for Nebraska a "2" in B1 and so on.

Below that I have a row 2 in which each cell is going to pull in different data. My formula right now looks like this.

Code:
=IF(AND($A$1=1,$B$1=1),B12,"")&IF(AND($A$1=1,$B$1=2),B29,"")

This goes through until I hit A1=1,B1=7 and then goes into A1=2,B1=7 and so forth. When I finally get to A1=6 I start to get errors. Im guessing maybe I hit my limit?

Just wondering if there was something to simplify this process. Thought maybe a nested VLOOKUP but not sure.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Just use the data validation drop down list.

Make a list of the states and a list of the months on 1 sheet in the background.

Name the ranges like MonthList, StateList

Then in Data validation, pick List, then for the data range you jsut type in =StateList or =MonthList and then that cell will have a drop down list which will put the actual text and not the index number of the list item.
 
Last edited:
Upvote 0
That wouldnt help with the formula. The only thing that would change would be my formula would now be =IF(and($A$1="January,$B$1="Missouri"),B12,"")

I think I would still have the same error by the time I got through June.

This formula is pulling data that automates my charts. For instance if it is January and Missouri Cell A2 would show 350, but if it was February and Missouri A2 would show 320. My chart is reading cell A2, so as the data is chosen my chart will automatically change.
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

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