Hi,
I currently have a task where I need to calculate thedifference between two sets of data,
The problem is I want to break it down per policy.
For example one policy could have 3 inputs in one set ofdata but only one in the other.
A policy could also appear in one set of data but not theother.
At the minute I am inserting a blank row like the example belowto identify the differences. This is a very manual task and I am sure there isa better way to accomplish what I am doing.
I was wondering could someone help me with some code I coulduse or maybe guide me on the best way to approach this, maybe a pivot.
Any help is greatly appreciated.
Below are examples of my original data and my data followingmy input?
Thanks,
[TABLE="width: 288"]
<colgroup><col width="64" style="width: 48pt;" span="3"> <col width="64" style="width: 48pt;" span="3"> <tbody>[TR]
[TD="width: 64, bgcolor: #FCE4D6"]Policy[/TD]
[TD="width: 64, bgcolor: #FCE4D6"]€[/TD]
[TD="width: 64, bgcolor: #FCE4D6"]Type[/TD]
[TD="width: 64, bgcolor: #FCE4D6"]Policy [/TD]
[TD="width: 64, bgcolor: #FCE4D6"]Type[/TD]
[TD="width: 64, bgcolor: #FCE4D6"]€[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"]LSR[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]BB[/TD]
[TD="bgcolor: transparent"]PCP[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]CC[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] PCP [/TD]
[TD="bgcolor: transparent"]CC[/TD]
[TD="bgcolor: transparent"]PCP[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"]LSR[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]ee[/TD]
[TD="bgcolor: transparent"]B2B[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]ff[/TD]
[TD="bgcolor: transparent"]LSR[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #FCE4D6"]Policy[/TD]
[TD="bgcolor: #FCE4D6"]€[/TD]
[TD="bgcolor: #FCE4D6"]Type[/TD]
[TD="bgcolor: #FCE4D6"]Policy [/TD]
[TD="bgcolor: #FCE4D6"]Type[/TD]
[TD="bgcolor: #FCE4D6"]€[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"]LSR[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: transparent"]BB[/TD]
[TD="bgcolor: transparent"]PCP[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]CC[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] PCP [/TD]
[TD="bgcolor: transparent"]CC[/TD]
[TD="bgcolor: transparent"]PCP[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"]LSR[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]ee[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] B2B [/TD]
[TD="bgcolor: transparent"]ee[/TD]
[TD="bgcolor: transparent"]B2B[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]ff[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]gg[/TD]
[TD="bgcolor: transparent"] € 2.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]gg[/TD]
[TD="bgcolor: transparent"]LSR[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
</tbody>[/TABLE]
I currently have a task where I need to calculate thedifference between two sets of data,
The problem is I want to break it down per policy.
For example one policy could have 3 inputs in one set ofdata but only one in the other.
A policy could also appear in one set of data but not theother.
At the minute I am inserting a blank row like the example belowto identify the differences. This is a very manual task and I am sure there isa better way to accomplish what I am doing.
I was wondering could someone help me with some code I coulduse or maybe guide me on the best way to approach this, maybe a pivot.
Any help is greatly appreciated.
Below are examples of my original data and my data followingmy input?
Thanks,
[TABLE="width: 288"]
<colgroup><col width="64" style="width: 48pt;" span="3"> <col width="64" style="width: 48pt;" span="3"> <tbody>[TR]
[TD="width: 64, bgcolor: #FCE4D6"]Policy[/TD]
[TD="width: 64, bgcolor: #FCE4D6"]€[/TD]
[TD="width: 64, bgcolor: #FCE4D6"]Type[/TD]
[TD="width: 64, bgcolor: #FCE4D6"]Policy [/TD]
[TD="width: 64, bgcolor: #FCE4D6"]Type[/TD]
[TD="width: 64, bgcolor: #FCE4D6"]€[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"]LSR[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]BB[/TD]
[TD="bgcolor: transparent"]PCP[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]CC[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] PCP [/TD]
[TD="bgcolor: transparent"]CC[/TD]
[TD="bgcolor: transparent"]PCP[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"]LSR[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]ee[/TD]
[TD="bgcolor: transparent"]B2B[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]ff[/TD]
[TD="bgcolor: transparent"]LSR[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #FCE4D6"]Policy[/TD]
[TD="bgcolor: #FCE4D6"]€[/TD]
[TD="bgcolor: #FCE4D6"]Type[/TD]
[TD="bgcolor: #FCE4D6"]Policy [/TD]
[TD="bgcolor: #FCE4D6"]Type[/TD]
[TD="bgcolor: #FCE4D6"]€[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"]LSR[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: transparent"]BB[/TD]
[TD="bgcolor: transparent"]PCP[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]CC[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] PCP [/TD]
[TD="bgcolor: transparent"]CC[/TD]
[TD="bgcolor: transparent"]PCP[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"]LSR[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]dd[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]ee[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] B2B [/TD]
[TD="bgcolor: transparent"]ee[/TD]
[TD="bgcolor: transparent"]B2B[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]ff[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[TD="bgcolor: #D9D9D9"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]gg[/TD]
[TD="bgcolor: transparent"] € 2.00 [/TD]
[TD="bgcolor: transparent"] LSR [/TD]
[TD="bgcolor: transparent"]gg[/TD]
[TD="bgcolor: transparent"]LSR[/TD]
[TD="bgcolor: transparent"] € 1.00 [/TD]
[/TR]
</tbody>[/TABLE]