+ Reply to Thread
Results 1 to 3 of 3

Summing two different columns depending on cell values of column A

  1. #1
    Registered User
    Join Date
    03-28-2012
    Location
    SF
    MS-Off Ver
    Excel 2010
    Posts
    1

    Summing two different columns depending on cell values of column A

    I am trying to compare sales this year compared to last year. I just want Year to date and not pull in all of last year's data to compare to this year.

    So on day three of month this is what my spreadsheet looks like.

    Column A
    Day 1 100
    Day 2 100
    Day 3 100

    Sum(a1:a31) = 300

    Column B
    Day 1 120
    Day 2 201
    Day 3 330
    ....
    ....
    Day 31 333

    Sum(b1:b31) = 3099


    If its the 3rd day of the month, I only want to look at day 3's data from both this year and last year.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Summing two different columns depending on cell values of column A

    With a pivot table is it a peace of cake (if your data are formatted well).
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Summing two different columns depending on cell values of column A

    Assuming Data in Columns A and B starting in Row 2 with new data in Col A

    =SUM($B$2:INDEX($B$2:$B$32,Match(999^100,$A$2:$A$32)))
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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