+ Reply to Thread
Results 1 to 4 of 4

Hlookup and Vlookup Combined (Match?)

  1. #1
    Registered User
    Join Date
    05-01-2009
    Location
    North East (Durham)
    MS-Off Ver
    Excel 2003,7 and 10
    Posts
    63

    Hlookup and Vlookup Combined (Match?)

    Is is possible to look up a vertical value then a horizontal value and show that value - I can then multiply it.

    E.g.

    Name,2007,2008,2009
    Elect,12,13,3
    Gas, 33,55,66
    Fuel, 10,11212,4343

    So it will look up the year and then select one of the values in that row,


    If did try the following:
    .=C11*INDEX(carbonfactors,MATCH(B11,carbonfactors,0),MATCH(C1,carbonfactors,0))

    C11 would be a consumption value, I have over 100 sites and I would like to automate the calculation process as and when new sites or sources are added

    See attached
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Hlookup and Vlookup Combined (Match?)

    you need something like this
    =INDEX($A$1:$E$6,MATCH(C10,$A$1:$E$1,0),MATCH(B12,$A$1:$A$6,0)) change c10,b12 to whatever cells hold the values you want to search for
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    05-01-2009
    Location
    North East (Durham)
    MS-Off Ver
    Excel 2003,7 and 10
    Posts
    63

    Re: Hlookup and Vlookup Combined (Match?)

    Thanks - got it working
    Got that bit working,
    =IF(G3=0,"",G3*INDEX(factorvalues,MATCH(D3,factorlist,0),MATCH(G$1,Year,0))) - I was including the main data headings.

    Instead of showing one value, how to I get it add a whole row ? is this an array with Hlookup?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Hlookup and Vlookup Combined (Match?)

    Instead of showing one value, how to I get it add a whole row
    what do you mean exactly?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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