Forum Discussion

dfidler's avatar
dfidler
Copper Contributor
Feb 27, 2019
Solved

Subtract numbers until gone

I have a spreadsheet with 3 points of data.

  1. Number to use per week
  2. Total number
  3. Week breakout

I need to take the number per week starting at week one then for week 2, 3, etc use the same number until the total number has been used.  I have attached an example to show what I am talking about.  Thanks in advanced

  • Hi,

     

    The first step is to link the Week1 cell to the Number to subtract per week using this formula:

    =A2

     

    The second step, use this formula in Week2 and drag it to the right:

    IF(SUM($D2:D2,$A2)<=$B2,$A2,IF($B2-SUM($D2:D2)=0,"",$B2-SUM($D2:D2)))

     

     

    Regards,

    Haytham

1 Reply

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    Hi,

     

    The first step is to link the Week1 cell to the Number to subtract per week using this formula:

    =A2

     

    The second step, use this formula in Week2 and drag it to the right:

    IF(SUM($D2:D2,$A2)<=$B2,$A2,IF($B2-SUM($D2:D2)=0,"",$B2-SUM($D2:D2)))

     

     

    Regards,

    Haytham