Subtracting from previous cell in column with data

Rexy69

New Member
Joined
Apr 28, 2015
Messages
16
Hi i have searched everywhere for this and i have found a few examples but they don't seem to work for me so thought i would try here !

basically i have a date column starting from B6 a profit column starting from C6 and a difference column starting from d6.

basically i have the dates for every date of the year but i wont have entries in every profit cell e.g

Date -----------Profit ------Difference
01/02/2019 ---£1000 -----£0.00
02/02/2019
03/02/2019
04/02/2019 ---£1,500 ----£500.00
05/02/2019
06/02/2019----£2,100 ----£600.00

I need the difference column to subtract the profit cell from the previous profit cell that has been entered, here is an example i found which looked like it was trying to solve the same issue but didnt work for me :

Code:
=IF(C6="","",IFERROR(C6-INDEX($C$6:C6,MATCH(1E+99,$C$6:C6)),C6))
This seems to just enter £0.00 next to each of the profit cells that has data and doesn't actually do a calculation to subtract from the last data cell

any help on this would be great

Thanks

Rexy~
 

Ron Coderre

MrExcel MVP
Joined
Jan 14, 2009
Messages
2,301
Try this formula:
Code:
D6: =IF(C6="","",IFERROR(C6-LOOKUP(1E+99,$C$5:C5),N(C5)))
Does that help?
 

Forum statistics

Threads
1,082,138
Messages
5,363,351
Members
400,729
Latest member
Lisa McConachy

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top