Subtract last value in the row.

bdtran

New Member
Joined
Oct 11, 2018
Messages
33
Hello All,

I am trying to get an excel formula to get result in row#2 based on the value data in row#1.

The first value in row#1 is always equal to same value which is 5, following the next number, which is 16, the result must be 16-5=11, and scanning through the next value is 20 subtract the last lookup value on same row is 16, which should be 20-16=4. I hope I am getting my point clear.

ABCDEFGHIJKL
15162045
2511425
3

<tbody>
</tbody>

Thanks much,
*BDT
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Welcome to Mr Excel forum

Try
B2 copied across
=IFERROR(IF(B1<>"",B1-LOOKUP(2,1/($A1:A1<>""),$A1:A1),""),B1)

Hope this helps

M.
 
Last edited:
Upvote 0
Also:
B2 copied across:
=IFERROR(IF(B1<>"",B1-LOOKUP(9.99999999E+307,$A1:A1),""),B1)
 
Last edited:
Upvote 0
Thank you to Marcelo and Scott.

I tried both solutions and got the same result that I am looking for.

Much appreciated!

*BDT
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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