When compare doesn't mean compare! How do I create a profit and loss sheet from 2 separate sheets?

jimsallyiona

New Member
Joined
Dec 7, 2016
Messages
3
Hi,
I have trawled all the forums and googled till I’m blue
but I’m losing my decorum and don’t know what to do!

Please can you help me solve what I think should be a really simple profit and loss spreadsheet problem?
Every time I look up ‘compare spreadsheets’ I find solutions which only highlight cells that are different from one another using conditional formatting as a sort of validation exercise to spot mistakes. Clearly I am using the wrong terminology!

I want to actually compare values in cells and report the difference in a new sheet.
I have:

Two Spreadsheets in 1 workbook.
Names “2014-2015” and “2015-2016”.
These contain cost data by commodity and are last year and this year’s data.
To start with assume each sheet is identical. List of 40 commodities in Column starting B3 and row of 12 Months starting in row 2.

How do I get excel to create a new sheet showing increase or decrease in cost (and by how much) when comparing the two years? In other words copies the template (I guess) of commodities and months and then populates the cells with profit or loss.

That's my opener! I will then need to make things a bit more complex, if it is possible, when one sheet has more commodities than another. I'll post a screen shot if someone has the time (patience) to explain how I do that.
Thanks so much for putting up with a numpty:eek:
Jim
 

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).
a slim down version of your data


Excel 2012
ABCDEF
1C1C2C3C4C5
2Jan120250160220250
3Feb250230190190230
4Mar240190140150120
5Apr160150110180200
6May240130230220160
7Jun150190220190250
8Jul180230180240220
9Aug170220200180120
10Sep200240110100250
11Oct110130110100160
12Nov170110190140190
13Dec230200140180200
2014-2015



Excel 2012
ABCDEF
1C1C2C3C4C5
2Jan160130210190120
3Feb110150220160210
4Mar220240140110190
5Apr110170160230250
6May100110130100150
7Jun190190190190220
8Jul190160120140180
9Aug240240190180140
10Sep170180100210230
11Oct130150250180240
12Nov160200230220250
13Dec130190170150170
2015-2016


and the new sheet, just copy formula in C1 to the whole range (+ve indicates increase in cost)


Excel 2012
ABCDEF
1C1C2C3C4C5
2Jan40-12050-30-130
3Feb-140-8030-30-20
4Mar-20500-4070
5Apr-5020505050
6May-140-20-100-120-10
7Jun400-300-30
8Jul10-70-60-100-40
9Aug7020-10020
10Sep-30-60-10110-20
11Oct20201408080
12Nov-1090408060
13Dec-100-1030-30-30
Diff
Cell Formulas
RangeFormula
B2='2015-2016'!B2-'2014-2015'!B2
 
Upvote 0
Hi
Thank you for this solution. Are you able to answer the other part of my problem.
How do I get Excel (OOps my version is through MS office 2010) to transpose/merge all the months and commodities as well onto the new sheet before doing the calculation?
How do I get the formula to work if there are more commodities in one year and not in another? If it helps it would be easy to give each commodity a reference number.

2014-2015
JanFebMarApril
Pots
Pans
Sticks
stones

<tbody>
</tbody>

2015-2016
JanFebMarApril
Pots
Sticks
Elephants
Lettuce

<tbody>
</tbody>

Thanks again,
Jim
 
Upvote 0
try this


Excel 2012
ABCDE
1JanFebMarApril
2Pots140130170160
3Sticks160200240250
4Elephants230150110140
5Lettuce130140230240
2015-2016



Excel 2012
ABCDE
1JanFebMarApril
2Pots210160190110
3Pans230250220240
4Sticks250110180150
5stones160250230140
2014-2015



Excel 2012
ABCDE
1JanFebMarApril
2Pots-30-9010-90
3Sticks0-1105010
4Elephants
5Lettuce
Diff
Cell Formulas
RangeFormula
B2=IFERROR(VLOOKUP($A2,'2015-2016'!$A:$E,MATCH(B$1,'2015-2016'!$A$1:$E$1,0),0) -VLOOKUP($A2,'2014-2015'!$A:$E,MATCH(B$1,'2014-2015'!$A$1:$E$1,0),0),"")
 
Last edited:
Upvote 0
try this

Excel 2012
ABCDE
1JanFebMarApril
2Pots140130170160
3Sticks160200240250
4Elephants230150110140
5Lettuce130140230240

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
2015-2016



Excel 2012
ABCDE
1JanFebMarApril
2Pots210160190110
3Pans230250220240
4Sticks250110180150
5stones160250230140

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
2014-2015



Excel 2012
ABCDE
1JanFebMarApril
2Pots-30-9010-90
3Sticks0-1105010
4Elephants
5Lettuce

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Diff

Worksheet Formulas
CellFormula
B2=IFERROR(VLOOKUP($A2,'2015-2016'!$A:$E,MATCH(B$1,'2015-2016'!$A$1:$E$1,0),0)
-VLOOKUP($A2,'2014-2015'!$A:$E,MATCH(B$1,'2014-2015'!$A$1:$E$1,0),0),""
)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Hi,
Thank you for this I will give it a try. If you have a sec could you explain a little to help me learn?
Jim
 
Upvote 0

Forum statistics

Threads
1,215,788
Messages
6,126,907
Members
449,348
Latest member
Rdeane

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