+ Reply to Thread
Results 1 to 4 of 4

VLOOKUP and HLOOKUP within one formula to find data [Stimulating but not too hard]

  1. #1
    Forum Contributor
    Join Date
    09-23-2015
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    187

    VLOOKUP and HLOOKUP within one formula to find data [Stimulating but not too hard]

    Hey all,

    I have a VLOOKUP embedded within a HLOOKUP and I am sort of confused how to do this. It is nothing too hard if your efficient with Excel. I have attached the spreadsheet so you can follow my explanation or else it will be confusing.

    Background:

    I have here a spreadsheet that I has a list of currency pairings on the left and I need to go find the correct rate/value in the tables with yellow headers on the right. The sheet will be formatted like this every time I export data however the Currencies pairings in B and C will constantly change, so I cannot simple reference the cell with it's corresponding value - I actually need to use VLOOKUP's and HLOOKUP's

    The Goal:

    Ultimate goal is to get the corresponding value/rate in column D

    (1) Step one would be to use the Base Currency value in Column A, to identify what table on the right (Col I to AD) we should be looking at for the correct values
    - this may require an HLOOKUP
    (2) Using the string in column B, i.e. EURCAD - to look within the table we just identified above and select the right pairing.
    - this may require a VLOOKUP


    Specific Example:

    So let's take an example. D3 would be GBPCAD which from the right tables with yellow headers gives you 1.63155. The forumula would ideally, would search the base currency (col A) among all the tables headers in yellow to the right, once it identifies it is the last table where it says GBP [AC:AD], it would than take the VLOOKUP Name [col C] 'GBpCAD' and search for this string within the table vertically, next it would output the value to the right.


    This is definitely not impossible but somewhat challenging for myself alone, I would appreciate any help I can get - even a suggestion if you can't crack the formula. Anything to steer me in the right path is much appreciated
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VLOOKUP and HLOOKUP within one formula to find data [Stimulating but not too hard]

    Assuming all tables are the same dimensions, try this in D3 and filled down

    =VLOOKUP(C3,OFFSET($I$4:$J$13,0,MATCH(A3,$I$3:$AD$3,0)-1),2,0)

  3. #3
    Forum Contributor
    Join Date
    09-23-2015
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: VLOOKUP and HLOOKUP within one formula to find data [Stimulating but not too hard]

    Quote Originally Posted by Jonmo1 View Post
    Assuming all tables are the same dimensions, try this in D3 and filled down

    =VLOOKUP(C3,OFFSET($I$4:$J$13,0,MATCH(A3,$I$3:$AD$3,0)-1),2,0)
    This works like a charm. You sir are the man, thank you so much!!!!! :D

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VLOOKUP and HLOOKUP within one formula to find data [Stimulating but not too hard]

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Vlookup and Hlookup in 1 formula?
    By seandjernes in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-15-2017, 10:25 AM
  2. [SOLVED] Transpose, Insert Row, VLOOKUP? Desired Data hard to work out...
    By Overkill in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2015, 01:48 PM
  3. How to use vlookup and hlookup in the same formula
    By pay227 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-22-2014, 04:44 PM
  4. Nesting vlookup and hlookup to find a value
    By macquarl in forum Excel General
    Replies: 1
    Last Post: 10-15-2010, 05:04 PM
  5. Replies: 4
    Last Post: 10-28-2009, 04:28 PM
  6. Pulldowns - hard to find data
    By Danielle123 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-31-2008, 02:09 PM
  7. [SOLVED] How do I find a value in an array (VLOOKUP? HLOOKUP?)
    By M Skabialka in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 03-10-2005, 11:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1