+ Reply to Thread
Results 1 to 4 of 4

Thread: SumIF with VLookup??

  1. #1
    Registered User
    Join Date
    01-26-2005
    Posts
    8

    Wink SumIF with VLookup??

    I have 2 excel documents. In the first I have a range of cells where one coumn is the date (in number month form, ex. march=3) and the other column is an amount.

    In the other document I want to be able to sum the amount column of the first doc. based on which month it is designated to. Ex. show the sum of all amounts in month 3 in one cell, month 4 in another. Is there a formula for this? I have tried and tried.

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2004
    Location
    London
    Posts
    231
    If the first workbook has the data in Sheet1 in cells a1:b7 and the summary sheet has the months in cells A1, A2, A3 etc. In the summary sheet in cell B1 enter the formula

    =SUMIF(Sheet1!$A$1:$B$7,A1,Sheet1!$B$1:$B$7)

    copy this into B2, B3 etc.

  3. #3
    Registered User
    Join Date
    01-26-2005
    Posts
    8
    It worked thanks! Now a tricky question if you know. If a month is labeled "all" instead of a number, it needs to be divided by 12 and distributed through each month. Would it be possible to add that into the function? That seems like a whopper, but its worth a try.

  4. #4
    Registered User
    Join Date
    01-27-2005
    Posts
    3
    Replace the previous function with:

    =SUMIF(Sheet1!$A$1:$B$7,A1,Sheet1!$B$1:$B$7) + SUMIF(Sheet1!$A$1:$B$7, "All", Sheet1!$B$1:$B$7)/12

+ 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.2.0