+ Reply to Thread
Results 1 to 2 of 2

Cumulative total with if function (tricky)

  1. #1
    Registered User
    Join Date
    05-25-2015
    Location
    london
    MS-Off Ver
    2007
    Posts
    54

    Cumulative total with if function (tricky)

    I am totalling up individual weekly sales from one table into a cumulative (running total) table.

    I need all cells to = NA() if we are not up to that week-number yet. This is so that the graph doesn't plot the points; excellent graphs treat NA() as empty.


    I am currently defaulting the cell to NA() if its value is equal to that of the previous week by doing the following:

    In C2

    =IF((A2+C1)=C1,NA(),A2+C1)

    This, however results in the running total defaulting to NA() if there are no sales in one particular week (A2 in this case would be = 0)

    Is there a way to do this without linking live dates into the formulae?

    If not, then how do i ask for this;

    IF(B1 is equal to or less than this week's week-number,(A2+C1),NA())

    Column B in this case is a list of numbers from 1 - 52.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,406

    Re: Cumulative total with if function (tricky)

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Cumulative Total
    By laura1812 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-23-2014, 06:03 PM
  2. cumulative total
    By santanu_ca in forum Excel General
    Replies: 0
    Last Post: 08-27-2010, 12:04 PM
  3. cumulative sub total, is it possible?
    By arctushar in forum Excel General
    Replies: 2
    Last Post: 04-15-2010, 01:56 PM
  4. Cumulative total
    By Huwbob in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2009, 08:49 AM
  5. [SOLVED] Cumulative Total
    By Paul Black in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-15-2006, 12:30 AM
  6. cumulative total
    By dfisherkern in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-17-2006, 01:20 AM
  7. CUMULATIVE TOTAL
    By Norm in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-03-2005, 12:06 PM
  8. Cumulative Total
    By RockyMountains in forum Excel General
    Replies: 9
    Last Post: 01-12-2005, 08:06 AM

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