Computing.Net > Forums > Office Software > VLOOKUP Table

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VLOOKUP Table

Reply to Message Icon

Name: Brian W
Date: April 27, 2009 at 09:29:02 Pacific
OS: Windows XP
CPU/Ram: 1.0 Gb
Product: Dell / INSPIRION
Subcategory: Microsoft Office
Comment:

I have a VLOOKUP and corresponding IF statements that give the correct responses.

Here is a portion of the VLOOKUP which is on worksheet "Tally" and Tally!$G$35 is the cell that contains "Monaghan".

1......2........3......4......5
VC Monaghan VC Hours 50
SL Monaghan SL Hours 6
JD Monaghan JD hours 10
PD Monaghan PD Hours 21
DS Monaghan DS Hours 18
EP Monaghan EP Hours 14
ER Monaghan ER Hours 36

(Monaghan is listed in the actual VLOOKUP only once, after VC. I needed to write the name each time to keep the rows and columns correct. I also added the "." for the same reason.)

The IF statement is"=if(BB11="",""),if(c11=tally!$G$35,VLOOKUP(BB11,Tally!$F$35:$V$47,5,0)....

Cell C11 contains "Monaghan" and BB11 contains a drop down menu; if "VC" is selected, the correct number appears in the appropriate cell.

I have just been informed that EP and ER need to broken out into separate sums rather the totals that were previously used. EP is now divided into "snow', "heat" and "park" and ER is now divided into the same three categories.

It seems as if I could change the VLOOKUP by replacing ER with "snow","heat", and "park" and do the same with EP. The problem I am having is with the drop down menu and the IF statement. The drop down menu can only consist of VC, SL, JD, PD, DS, ER, EP, and a blank. How can I rewrite the IF statement so the subdivision totals for ER and EP will be appear in the appropriate cell.

Thank you.




Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: April 27, 2009 at 09:57:39 Pacific
Reply:

Why can't the drop down contain ER (Heat), EP (Heat), ER (Snow), EP (Snow), etc.?

Won't you need to have rows for these values in your LOOKUP table?

If not, where will you be storing the data realted to the 3 (6) new sub-categories?


0

Response Number 2
Name: Brian W
Date: April 28, 2009 at 11:04:49 Pacific
Reply:

DerbyDad03,

I realize that I would need to add additional values in the LOOKUP table but that isn't my major problem. I can't use your suggestion of adding ER (Heat), EP (Heat), etc, to the drop down as only ER and EP, without any additions, are allowed. Without those qualifiers, I don't know how to show ER Heat, etc, values in the appropriate cells.

Thank you.


0

Response Number 3
Name: DerbyDad03
Date: April 28, 2009 at 14:16:51 Pacific
Reply:

re: only ER and EP, without any additions, are allowed.

Who says? You're building the spreadsheet aren't you? Add the rows for EP (Heat) etc. to your lookup table and add EP (Heat) etc. to your drop down.

If, for whatever reason, you really can't do that, you haven't given us enough information for us to modify any formulae. We don't know where the Heat, Snow or Park data is stored and we don't know how you are choosing Heat, Snow or Park.

Generically, I tried the following and it seemed to work. Only you can determine how to incorporate this method into your spreadsheet.

Let's say I want to use a VLOOKUP but I don't know which col_index_num to pull data from because of my second criteria (Heat, Snow, Park).

Assuming that the data for Heat, Snow and Park are on the same row as what I am looking up, I can use MATCH to select the VLOOKUP col_index_num.

Let's say ER or EP is in A5
Let's say Heat, Snow or Park is in B5
Let's say this data table is in A1:G2:

    A    B   C     D    E    F    G
1  EP  Heat  10  Snow  11  Park  12
2  ER  Heat  14  Snow  15  Park  16

This formula will LOOKUP EP or ER from A5 and then set the col_index_num by using MATCH to find the relative position of the value in B5 and then adding 1 to it.

=VLOOKUP(A5,A1:G2,MATCH(B5,A1:G1,0)+1,0)

For example, if A5 contains ER and B5 contains Snow, the formula will be equivalent to:

=VLOOKUP("ER",A1:G2,5,0) and will return 15

Note:
The MATCH function only uses 1 row for it's lookup_array, so the position of Heat, Snow and park has to be the same in every row of the Lookup Table. If it's not, then things get very complicated.


0

Response Number 4
Name: Brian W
Date: April 30, 2009 at 06:14:53 Pacific
Reply:

DerbyDad03,

Thank you for your response. I'll try to incorporate MATCH into my design; if that is unsuccesful, I'll try to convince the end user, my son-in-law, to allow an extended drop down menu which will include the ER and EP subsets.

Brian W


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Cannot open or create ite... Table of Contents



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: VLOOKUP Table

VLOOKUP tables www.computing.net/answers/office/vlookup-tables/5093.html

Excel Nested IF/Vlookup www.computing.net/answers/office/excel-nested-ifvlookup/4349.html

Copy & Paste Problems in Excel www.computing.net/answers/office/copy-amp-paste-problems-in-excel/3992.html