+ Reply to Thread
Results 1 to 4 of 4

Sum of a changing column

  1. #1
    Registered User
    Join Date
    09-24-2007
    Posts
    15

    Sum of a changing column

    I have a lot of data that gets entered into a spreadsheet. There are 3 columns I have. A is the date of purchase, B is the type (wholesale or retail) and C is the value. Every day, they are updated. The issue is that in Column D1, I have the sum of all of the wholesale, and D2 has the sum of all of the retail. So on day 1, column D1 looks like:

    =SUM(C1:C19)
    but on day 2 it will be
    =SUM(C1:C44)

    and D2 will be
    =SUM(C20:C999)
    and day 2 it will be
    =SUM(C45:C999)

    Is there a way to make a function that will automatically detect and add up wholesale and retail prices?

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Would this work for you

    =SUMIF(B:B,"wholesale",C:C)

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    09-24-2007
    Posts
    15
    Yep, works great!

    Thanks a lot! You guys rock!

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Glad you sorted your problem

    Thx for the feedback

    VBA Noob

+ 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