+ Reply to Thread
Results 1 to 6 of 6

array formula macro

  1. #1
    Registered User
    Join Date
    03-06-2010
    Location
    essex, england
    MS-Off Ver
    Excel 2003
    Posts
    23

    array formula macro

    Hi all,
    Please bear with me on this one as its hard to explain what i need, so here goes:
    I have 2 different worksheets in one workbook, lets call them sheet1 and sheet2.
    Sheet 1 is data and sheet2 is results.

    colum a in sheet 2 has a list of numbers approx 5000 rows long

    what i need is to take sheet2 cell a1's number look for it in sheet1 colum L, when found
    return the number from sheet1 colum n and place it in sheet2 cell b1, sounds easy right!!

    heres the catch, the number sheet2 is looking for might be repeated multiple times in sheet1 colum L, so I would need it to add all the times it finds it together in colum n and sum the results in sheet 2 cell b1, like an array formula.

    and just to chuck a spanner in the works repeat this process down the page of sheet2 untill theres nothing else to look for.

    sorry for the bad explaination
    any help would be great.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: array formula macro

    Look at SUMPRODUCT

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-06-2010
    Location
    essex, england
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: array formula macro

    thanks for your reply, but would rather it was a macro

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: array formula macro

    It would help to understand your requirements and possible solutions if you posted a sample workbook with some typical data and layout, etc

    Regards

  5. #5
    Registered User
    Join Date
    03-06-2010
    Location
    essex, england
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: array formula macro

    i would like to but for some reason my computer wont let me up load, illtry to make a small example here:


    data steet:

    colum L..............colum N
    12345.................2
    12345.................3
    12347.................1
    12347.................5
    12348.................1
    12348.................6

    results sheet:

    colum A..............colum B
    12345.................(answer, search colum A, for a match in colum L (data sheet) and
    ..........................add the numbers from colum N (data sheet) together),so the. answer in this case in cell B1 would be 5
    12347.................
    12348.................

    thanks

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: array formula macro

    Why not just use a Pivot Table?

    Regards

+ 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