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~
 

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Ron Coderre

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

Watch MrExcel Video

Forum statistics

Threads
1,122,233
Messages
5,594,964
Members
413,955
Latest member
FalcoDaz

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
Top