If there is a decrease between these 2 cells, then populate the difference.

LBrain

New Member
Joined
Aug 2, 2016
Messages
7
Sheet 1

2001 2002 2003
john 8 9 8
joe 7 8 9
kyle 8 8 6.5

I have duplicated this sheet, and would now like the cells below the years to be populated with the decrease on the duplicated sheet.
I want it to look like this vvvv


2001 2002 2003
john - - 1
joe - - -
kyle - - 1.5

Is there a formula for the second sheet that can help me with this?
Thanks!
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Sheet2, Cell B2:

=IFERROR(IF(Sheet1!A2-Sheet1!B2>0,Sheet1!A2-Sheet1!B2,0),0)
 
Last edited:
Upvote 0
now what if there are blank cells between these numbers?

2001 2002 2003 2004
john 8 9 8
joe 7 6
kyle 7 7 8 9
 
Upvote 0
Hi!

Another option could be:

=MAX(;N(Sheet1!A2)-Sheet1!B2)

Blessings!
 
Upvote 0
If there are blanks, they will be treated as zeroes.

2001 2002 2003 2004
john 8 9 8
joe 7 6
kyle 7 7 8 9

will return:
2001 2002 2003 2004
john - - 1 8
joe - 1 6 -
kyle - - - -

If you'd rather have empty cells, then use:

Sheet2, Cell B2:
=IF(ISBLANK(Sheet1!B2),"",IFERROR(IF(Sheet1!A2-Sheet1!B2>0,Sheet1!A2-Sheet1!B2,0),0))​



 
Upvote 0
With John's option:

Sheet2, Cell B2:
=IF(ISBLANK(Sheet1!B2),"",MAX(,N(Sheet1!A2)-Sheet1!B2))
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,022
Members
448,939
Latest member
Leon Leenders

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