richardallen
New Member
- Joined
- Feb 13, 2014
- Messages
- 12
I am looking to write a macro to compare and 'match' 2 data sets.
They are currently in separate sheets and consist of:
Sheet 1: Sales Table with Sale Date & Sale Amount:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD]Sale Date[/TD]
[TD]Sale £[/TD]
[/TR]
[TR]
[TD]1/8[/TD]
[TD]£710[/TD]
[/TR]
[TR]
[TD]2/8[/TD]
[TD]£834[/TD]
[/TR]
[TR]
[TD]3/8[/TD]
[TD]£692[/TD]
[/TR]
[TR]
[TD]4/8[/TD]
[TD]£672[/TD]
[/TR]
[TR]
[TD]5/8[/TD]
[TD]£768[/TD]
[/TR]
[TR]
[TD]6/8[/TD]
[TD]£452[/TD]
[/TR]
[TR]
[TD]7/8[/TD]
[TD]£890[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 2: Bank Table with Bank Date, Bank Amount and 2 spaces for the matched info
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Banked Date[/TD]
[TD]Bank £[/TD]
[TD]Sales Date[/TD]
[TD]Sales £[/TD]
[/TR]
[TR]
[TD]3/8[/TD]
[TD]£523[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3/8[/TD]
[TD]£830[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3/8[/TD]
[TD]£711[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9/8[/TD]
[TD]£420[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9/8[/TD]
[TD]£680[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9/8[/TD]
[TD]£767[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9/8[/TD]
[TD]£695[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need to match similar amounts. Takings will be banked a few days after the sales day and are grouped. Bankings will differ (mostly a few pounds higher/lower).
I need to, using a macro, to find the likely sales and put them into the banking table.
Any ideas? Thanks.
They are currently in separate sheets and consist of:
Sheet 1: Sales Table with Sale Date & Sale Amount:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD]Sale Date[/TD]
[TD]Sale £[/TD]
[/TR]
[TR]
[TD]1/8[/TD]
[TD]£710[/TD]
[/TR]
[TR]
[TD]2/8[/TD]
[TD]£834[/TD]
[/TR]
[TR]
[TD]3/8[/TD]
[TD]£692[/TD]
[/TR]
[TR]
[TD]4/8[/TD]
[TD]£672[/TD]
[/TR]
[TR]
[TD]5/8[/TD]
[TD]£768[/TD]
[/TR]
[TR]
[TD]6/8[/TD]
[TD]£452[/TD]
[/TR]
[TR]
[TD]7/8[/TD]
[TD]£890[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 2: Bank Table with Bank Date, Bank Amount and 2 spaces for the matched info
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Banked Date[/TD]
[TD]Bank £[/TD]
[TD]Sales Date[/TD]
[TD]Sales £[/TD]
[/TR]
[TR]
[TD]3/8[/TD]
[TD]£523[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3/8[/TD]
[TD]£830[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3/8[/TD]
[TD]£711[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9/8[/TD]
[TD]£420[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9/8[/TD]
[TD]£680[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9/8[/TD]
[TD]£767[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9/8[/TD]
[TD]£695[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need to match similar amounts. Takings will be banked a few days after the sales day and are grouped. Bankings will differ (mostly a few pounds higher/lower).
I need to, using a macro, to find the likely sales and put them into the banking table.
Any ideas? Thanks.