Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Location
    Winchester, Hampshire, United Kingdom
    Posts
    64
    Thanks
    1
    Thanked 1 Time in 1 Post

    Matching values in a workbook (Excel 2000)

    I have a workbook into which two separate data columns are imported (each to a sperate sheet). One of these lists contains a comprehensive list (list 1) of data values identified by client number, the other (list 2) contains a limited number of these client numbers. I'm trying to build a combined listing of all the values in the comprehensive list plus the limited list values - ie, where a client number is represented in list 1 only, it is shown in list 3, and where it appears in both lists, the values are added and shown in list 3.

    I have created ranges to cover lists 1 and 2, and have tried using VLOOKUP to achieve what I want, but so far without success. To complicate matters, I'd like to create a template tat will allow varying sized lists 1 and 2 to be imported each month and then combined as above into the list 3.

    I have attached a sample of what I'm trying to achieve - list 1 is on sheet 3 ("billing"), list 2 is on sheet 2 ("woff"), and list 3, the summary, will be on shhet 1. Be grateful for any help on resolving this!

    thanks

    Richard

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Matching values in a workbook (Excel 2000)

    The Excel gurus will probably come up with a very general and flexible solution, but in the meantime here is a simplistic solution (see attached workbook). The following formula will get the combined value for the first item in the comprehensive list; fill down as far as needed.

    =billing!B2+IF(ISNA(VLOOKUP(billing!A2,woff,2,FALS E)),0,VLOOKUP(billing!A2,woff,2,FALSE))

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Matching values in a workbook (Excel 2000)

    Hi Richard,

    Hans' solution should do what you want, though a slightly shorter formula would be:
    =billing!B2+IF(COUNTIF(woff!A:A,A2)=0,0,INDEX(woff !B:B,MATCH(A2,woff!A:A)))
    This works on the whole of columns A & B on the woff sheet, but you could restrict the range by adding absolute row numbers (eg A$2:A$12), or giving columns A & B on the woff sheet their own defined names and using those.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  4. #4
    Star Lounger
    Join Date
    Apr 2001
    Location
    Winchester, Hampshire, United Kingdom
    Posts
    64
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Matching values in a workbook (Excel 2000)

    Thanks, much appreciated. I was only using @Vlookup once in the formula.

Posting Permissions

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