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[TD]9
[/TD]
[TD]DEF
[/TD]
[TD]23 Delta Road
[/TD]
[TD]Leeds
[/TD]
[TD]LE32 2UH
[/TD]
[TD]2
[/TD]
[TD]4
[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]ABC
[/TD]
[TD]3 Bravo Close
[/TD]
[TD]Corby
[/TD]
[TD]CO17 6WS
[/TD]
[TD]5
[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]GHI
[/TD]
[TD]8 Foxtrot Avenue
[/TD]
[TD]Hessle
[/TD]
[TD]HU3 3WQ
[/TD]
[TD]1
[/TD]
[TD]4
[/TD]
[/TR]
</tbody>[/TABLE]
I need to produce a table from this where the number of Pieces in Column F are totalled where the Company, Add1 and Post Code values in Columns A,B and D are exactly the same.
The following Rows would be considered as matching.
2 and 7
3 and 9
6 and 8
So the resultant data would need to look like:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Company
[/TD]
[TD]Add1
[/TD]
[TD]Town
[/TD]
[TD]Postcode
[/TD]
[TD]Region
[/TD]
[TD]Pieces
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]ABC
[/TD]
[TD]1 Alpha Street
[/TD]
[TD]Hull
[/TD]
[TD]HU1 2PP
[/TD]
[TD]1
[/TD]
[TD]4
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]DEF
[/TD]
[TD]23 Delta Road
[/TD]
[TD]Leeds
[/TD]
[TD]LE32 2UH
[/TD]
[TD]2
[/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]ABC
[/TD]
[TD]3 Bravo Close
[/TD]
[TD]Hull
[/TD]
[TD]HU1 4HY
[/TD]
[TD]1[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]DEF
[/TD]
[TD]4 Echo Lane
[/TD]
[TD]Derby
[/TD]
[TD]DE3 8GF
[/TD]
[TD]3
[/TD]
[TD]4
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]GHI
[/TD]
[TD]8 Foxtrot Avenue
[/TD]
[TD]Halifax
[/TD]
[TD]HA1 2RR
[/TD]
[TD]4
[/TD]
[TD]9
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]ABC[/TD]
[TD]Bravo Close[/TD]
[TD]Corby[/TD]
[TD]CO17 6WS[/TD]
[TD]5[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]GHI[/TD]
[TD]8 Foxtrot Avenue[/TD]
[TD]Hessle[/TD]
[TD]HU3 3WQ[/TD]
[TD]1[/TD]
[TD]4
[/TD]
[/TR]
</tbody>[/TABLE]
If this can be done, I will then need to make it work in VBA.
Is it possible?
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Company
[/TD]
[TD]Add1
[/TD]
[TD]Town
[/TD]
[TD]Postcode
[/TD]
[TD]Region
[/TD]
[TD]Pieces
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]ABC
[/TD]
[TD]1 Alpha Street
[/TD]
[TD]Hull
[/TD]
[TD]HU1 2PP
[/TD]
[TD]1
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]DEF
[/TD]
[TD]23 Delta Road
[/TD]
[TD]Leeds
[/TD]
[TD]LE32 2UH
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]ABC
[/TD]
[TD]3 Bravo Close
[/TD]
[TD]Hull
[/TD]
[TD]HU1 4HY
[/TD]
[TD]1[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]DEF
[/TD]
[TD]4 Echo Lane
[/TD]
[TD]Derby
[/TD]
[TD]DE3 8GF
[/TD]
[TD]3
[/TD]
[TD]4
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]GHI
[/TD]
[TD]8 Foxtrot Avenue
[/TD]
[TD]Halifax
[/TD]
[TD]HA1 2RR
[/TD]
[TD]4
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]ABC
[/TD]
[TD]1 Alpha Street
[/TD]
[TD]Hull
[/TD]
[TD]HU1 2PP
[/TD]
[TD]1
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]GHI
[/TD]
[TD]8 Foxtrot Avenue
[/TD]
[TD]Halifax
[/TD]
[TD]HA1 2RR
[/TD]
[TD]4
[/TD]
[TD]6
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]DEF
[/TD]
[TD]23 Delta Road
[/TD]
[TD]Leeds
[/TD]
[TD]LE32 2UH
[/TD]
[TD]2
[/TD]
[TD]4
[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]ABC
[/TD]
[TD]3 Bravo Close
[/TD]
[TD]Corby
[/TD]
[TD]CO17 6WS
[/TD]
[TD]5
[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]GHI
[/TD]
[TD]8 Foxtrot Avenue
[/TD]
[TD]Hessle
[/TD]
[TD]HU3 3WQ
[/TD]
[TD]1
[/TD]
[TD]4
[/TD]
[/TR]
</tbody>[/TABLE]
I need to produce a table from this where the number of Pieces in Column F are totalled where the Company, Add1 and Post Code values in Columns A,B and D are exactly the same.
The following Rows would be considered as matching.
2 and 7
3 and 9
6 and 8
So the resultant data would need to look like:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Company
[/TD]
[TD]Add1
[/TD]
[TD]Town
[/TD]
[TD]Postcode
[/TD]
[TD]Region
[/TD]
[TD]Pieces
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]ABC
[/TD]
[TD]1 Alpha Street
[/TD]
[TD]Hull
[/TD]
[TD]HU1 2PP
[/TD]
[TD]1
[/TD]
[TD]4
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]DEF
[/TD]
[TD]23 Delta Road
[/TD]
[TD]Leeds
[/TD]
[TD]LE32 2UH
[/TD]
[TD]2
[/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]ABC
[/TD]
[TD]3 Bravo Close
[/TD]
[TD]Hull
[/TD]
[TD]HU1 4HY
[/TD]
[TD]1[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]DEF
[/TD]
[TD]4 Echo Lane
[/TD]
[TD]Derby
[/TD]
[TD]DE3 8GF
[/TD]
[TD]3
[/TD]
[TD]4
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]GHI
[/TD]
[TD]8 Foxtrot Avenue
[/TD]
[TD]Halifax
[/TD]
[TD]HA1 2RR
[/TD]
[TD]4
[/TD]
[TD]9
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]ABC[/TD]
[TD]Bravo Close[/TD]
[TD]Corby[/TD]
[TD]CO17 6WS[/TD]
[TD]5[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]GHI[/TD]
[TD]8 Foxtrot Avenue[/TD]
[TD]Hessle[/TD]
[TD]HU3 3WQ[/TD]
[TD]1[/TD]
[TD]4
[/TD]
[/TR]
</tbody>[/TABLE]
If this can be done, I will then need to make it work in VBA.
Is it possible?