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:eeek:
Jim
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
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
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]April[/TD]
[/TR]
[TR]
[TD]Pots[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Pans[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Sticks[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]stones[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

2015-2016
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]April[/TD]
[/TR]
[TR]
[TD]Pots[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Sticks[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Elephants[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lettuce[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

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
JanFebMarApril
Pots
Sticks
Elephants
Lettuce

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]140[/TD]
[TD="align: right"]130[/TD]
[TD="align: right"]170[/TD]
[TD="align: right"]160[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]160[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]240[/TD]
[TD="align: right"]250[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]230[/TD]
[TD="align: right"]150[/TD]
[TD="align: right"]110[/TD]
[TD="align: right"]140[/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]130[/TD]
[TD="align: right"]140[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]240[/TD]

</tbody>
2015-2016



Excel 2012
ABCDE
JanFebMarApril
Pots
Pans
Sticks
stones

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]210[/TD]
[TD="align: right"]160[/TD]
[TD="align: right"]190[/TD]
[TD="align: right"]110[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]230[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]220[/TD]
[TD="align: right"]240[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]250[/TD]
[TD="align: right"]110[/TD]
[TD="align: right"]180[/TD]
[TD="align: right"]150[/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]160[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]140[/TD]

</tbody>
2014-2015



Excel 2012
ABCDE
JanFebMarApril
Pots
Sticks
Elephants
Lettuce

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]-30[/TD]
[TD="align: right"]-90[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]-90[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]0[/TD]
[TD="align: right"]-110[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]10[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]5[/TD]

</tbody>
Diff

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B2[/TH]
[TD="align: left"]=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),""
)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

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,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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