Consulting

Results 1 to 5 of 5

Thread: Building Tables from List

  1. #1
    VBAX Regular
    Joined
    Aug 2009
    Posts
    12
    Location

    Building Tables from List

    Hi All,

    See attachment

    Can anyone help me with the formula required to return the values from the list on the left into the proper table on the right. Referances are in green, results are in yellow.

    Thanks
    Attached Images Attached Images

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    Hi James,

    Try the following array formula in K16:
    =INDEX($G15:$G115,MATCH($J16&K$15,$A$15:$A$115&$B$15:$B$115,0))
    Copy across to M16. Change the ranges to suit your needs.

    Note: Array formulae are input with Ctrl-Shift-Enter.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Here is an alternative without concatenation

    =INDEX($G15:$G115,MATCH(1,($A$15:$A$115=$J16)*($B$15:$B$115=K$15),0))

    also array-entered.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    VBAX Regular
    Joined
    Aug 2009
    Posts
    12
    Location
    Hi Paul,

    Worked a treat, Thanks. But how do I stop it returning a #N/A error. I tried using =IF(ISERROR(x)=TRUE),"",x) but it clagged on me.

    James

  5. #5
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    Hi James,

    It becomes a case of doing something like:
    =IF(ISERROR(INDEX($G15:$G115,MATCH($J16&K$15,$A$15:$A$115&$B$15:$B$115,0))) ,"",INDEX($G15:$G115,MATCH($J16&K$15,$A$15:$A$115&$B$15:$B$115,0)))
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

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