+ Reply to Thread
Results 1 to 3 of 3

Summing values conditionally

  1. #1
    Registered User
    Join Date
    05-27-2007
    Posts
    2

    Summing values conditionally

    I have a list of values that was imported from a text file. It's the volume of a stock that’s traded for each minute the market is open. I'd like to track the running sum of the value throughout the day (i.e. @ 9:31 it's trades 100 shares for the day, at 9:32 its traded another 65 shares making the total 165 shares so far today, etc..).

    Is there a way to conditionally sum the values based on the date field? The import of the historical data is all connected so that when I try to sum the values the running total continues day to day. I've tried to put a row in between each day's data; however the file has several years worth of data and it's at least a full day project.

    Any guidance is greatly appreciated.

    Thank You
    Derek

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Do you have a column with both date and time or a separate date and time column? If it's the former in column A and amounts to total in B you could use this formula in c1 copied down

    =IF(INT(A1)=INT(A2),"",SUMPRODUCT(--(INT(A$1:A1)=INT(A1)),B$1:B1))

    gives a total on the last entry for each day

  3. #3
    Forum Contributor
    Join Date
    10-11-2007
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    251
    Maybe you can edit this formula to your needs.

+ 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