Formula help

Kclynn

Board Regular
Joined
Jan 23, 2020
Messages
66
Office Version
  1. 365
Platform
  1. Windows
I need the very next cell in the row to be the difference left between the sum of the previous cells in the row.

ISDProjectedGrossMargins2020_3_27.xlsx
KLMNOPQRSTUVWXYZAAABAC
56RecognizeFunded%BookMos.DecJan-20Feb-20Mar-20Apr-20May-20Jun-20Jul-20Aug-20Sep-20Sep-20Jan-00Dec-20
57200,000 030%7/197
580Y330%4
5921,000 020%6/194
60128,000 128,00099%3/2060 0 13,653 13,653 13,653 13,653 13,653 13,653 0 0 0 0
61530,000 530,00070%4/2070 0 0 48,457 48,457 48,457 48,457 48,457 48,457 48,457 0 0
62350,000 35%5/2060 0 0 0 37,333 37,333 37,333 37,333 37,333 37,333 0 0
Projected Margins 11x17 (2)
Cell Formulas
RangeFormula
R60:AC62R60=IF(AND(R$56>=$O60,R$56<EDATE($O60,$P60)),(($K60/$P60)*0.64),0)
L57:L61L57=IF($C57<>"D",K57,0)
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Next cell and Previous cells are a bit ambiguous, it might be obvious to you, but you will need to narrow it down with some more precise definitions before we will be able to provide you with an answer.
 
Upvote 0
Next cell and Previous cells are a bit ambiguous, it might be obvious to you, but you will need to narrow it down with some more precise definitions before we will be able to provide you with an answer.

My apologies I will provide the best explanation that I can. So 64% of the amount in column "K" the "Recognize" amount is being allocated over the number of months shown in column "P" "Mos." with the start date being shown in the column "O" "Book" the next column i.e. if mos is 7 then column 8 would be the difference between column K and the sum of allocated cells shown in the row.
 
Upvote 0
Unless I'm still missing something, I think that you just need

=K60-SUM(R60:AC60)
 
Upvote 0
Unless I'm still missing something, I think that you just need

=K60-SUM(R60:AC60)

I need it to be incorporated with the formula "=IF(AND(T$56>=$O60,T$56<EDATE($O60,$P60)),(($K60/$P60)*0.64),0)" so that the formula works throughout
 
Upvote 0
I think that I get it now, try this one in R60, then drag to fill the rest of the table.

=IF(AND(R$56>=$O60,R$56<EDATE($O60,$P60)),(($K60/$P60)*0.64),IF(AND(Q$56<EDATE($O60,$P60),R$56>=EDATE($O60,$P60)),$K60-SUM($Q60:Q60),0))

Note that the formula works on the assumption that column Q will be empty, there needs to be at least one empty column between 'mos' and the first formula.
 
Upvote 0
I think that I get it now, try this one in R60, then drag to fill the rest of the table.

=IF(AND(R$56>=$O60,R$56<EDATE($O60,$P60)),(($K60/$P60)*0.64),IF(AND(Q$56<EDATE($O60,$P60),R$56>=EDATE($O60,$P60)),$K60-SUM($Q60:Q60),0))

Note that the formula works on the assumption that column Q will be empty, there needs to be at least one empty column between 'mos' and the first formula.
Yes, this is definitely doing what I wanted, for the most part, the one question I have is why does the difference always appear in column AC instead of the next cell adjacent. i.e. Row 60 difference $ should be where it is column Z, row 61 difference $ should be in column AA and row 61 difference $ should be in column AA. So very close to what I'm looking for.
 
Upvote 0
Yes, this is definitely doing what I wanted, for the most part, the one question I have is why does the difference always appear in column AC instead of the next cell adjacent. i.e. Row 60 difference $ should be where it is column Z, row 61 difference $ should be in column AA and row 61 difference $ should be in column AA. So very close to what I'm looking for.

Never mind I found my error. I want to thank you so very much for all your help!! I'm not for great at this and truly appreciate the help. I just love this forum. Stay healthy and have a great day!!
 
Upvote 0

Forum statistics

Threads
1,215,472
Messages
6,125,003
Members
449,203
Latest member
Daymo66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top