Hello,
I need to pull data based on financial quarter AND year (ex: Q1 of 2010). Is it possible to incorporate both into the lookup value of a vlookup? Is there some other way to do this?
Any help would be greatly appreciated.
Thanks
Hello,
I need to pull data based on financial quarter AND year (ex: Q1 of 2010). Is it possible to incorporate both into the lookup value of a vlookup? Is there some other way to do this?
Any help would be greatly appreciated.
Thanks
<----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left
If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.
I can think of a few ways of doing this.
1 relatively simple way would be to use a helper column to combine the 1 columns of info, then use that for the search. This column can be hidden if needed, and if you put to the left of your data, you could use VLOOKUP.
A B C D 1Option 1, helper on the left 2A1 B1 11 3Helper Data1 Data2 Value 4A1B1 A1 B1 11 5A2B2 A2 B2 22 6A3B3 A3 B3 33 7A4B4 A4 B4 44 8A5B5 A5 B5 55 9A6B6 A6 B6 66
C2=VLOOKUP(A2&B2,$A$4:$D$9,4,0)
If you add the helper to the right, then INDEX/MATCH is the tool to use.
A B C D 11Option 2, Helper on the right 12A1 B1 11 13Data1 Data2 Value Helper 14A1 B1 11A1B1 15A2 B2 22A2B2 16A3 B3 33A3B3 17A4 B4 44A4B4 18A5 B5 55A5B5 19A6 B6 66A6B6
C12=INDEX($C$14:$C$19,MATCH(A12&B12,$D$14:$D$19,0))
A B C 21Option 3, No helper, using ARRAY 22 23A1 B1 11 24Data1 Data2 Value 25A1 B1 11 26A2 B2 22 27A3 B3 33 28A4 B4 44 29A5 B5 55 30A6 B6 66
C23=INDEX($C$25:$C$30,MATCH(A23&B23,$A$25:$A$30&$B$25:$B$300))
There are a few more complex formulas you could use, but hopefull, 1 of these will give you what you need
Another, slightly more complex approach would be to use am ARRAY formula
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks