Results 1 to 4 of 4

Thread: Auto sum

  1. #1
    Lounger
    Join Date
    Feb 2004
    Location
    Romania
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dear All,

    I have the following attached table.
    I want to create a macro to do automatically sum the values from the first sheet into the second sheet.
    A function to search the data where I have the: "A, A1, B, B1...." to sum the values into the second sheet as is in the example.

    I thing to search for the name A1 .... and the left cell of the cell with name to sum into the sheet 2.

    Best regards,
    Marius
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I'd enter the contract names A, A1 etc. in column A on Sheet2. In the attached version, I've used a custom format "Contract "@ to display Contract A, Contract A1 etc.

    You can then use the following array formula (confirm with Ctrl+Shif+Enter) in B6:

    =SUM(IF(Sheet1!$D$9:$P$19=A6,Sheet1!$C$9:$O$19))

    and fill down to B17.
    Attached Files Attached Files

  3. #3
    Lounger
    Join Date
    Feb 2004
    Location
    Romania
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='772184' date='24-Apr-2009 20:00']I'd enter the contract names A, A1 etc. in column A on Sheet2. In the attached version, I've used a custom format "Contract "@ to display Contract A, Contract A1 etc.

    You can then use the following array formula (confirm with Ctrl+Shif+Enter) in B6:

    =SUM(IF(Sheet1!$D$9:$P$19=A6,Sheet1!$C$9:$O$19))

    and fill down to B17.[/quote]


    Thanks, is what i need.

  4. #4
    2 Star Lounger
    Join Date
    Aug 2004
    Posts
    123
    Thanks
    0
    Thanked 1 Time in 1 Post
    For a single conditional sum, SUMIF function appeared better/faster than SUM+IF in combined

    B6, enter the formula and copied down :

    =SUMIF(Sheet1!D$9:P$19,A6,Sheet1!C$9)

    Regards
    Bosco

Posting Permissions

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