smide
Board Regular
- Joined
- Dec 20, 2015
- Messages
- 164
- Office Version
- 2016
- Platform
- Windows
In Sheet1 (starting from row3, A-X columns) I have a data summary (product's mark and product's prices) and Sheet2 is only for the raw data.
Product's mark is characteristic which contains one to six letters (always to the left of price).
I need a Macro to copy/append data from Sheet2 to Sheet1 in an appropriate column (based on identical products columns). // something like hlookup function in macro
Also, I need to remove (if there are) duplicates based on mark columns (cells which already contains the same marks as marks in Sheet1).
Example.
Sheet1 (before update)
[TABLE="class: grid, align: center"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]...[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Product1[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Product5[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Product4
[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]a[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]b[/TD]
[TD="align: center"]21[/TD]
[TD="align: center"]s[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]b[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]f[/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]pq[/TD]
[TD="align: center"]31[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]c[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]rd[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]w[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
Sheet2 (obtained new "raw" data)
[TABLE="class: grid, align: center"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]...[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Product4[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Product1[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Product5
[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]w[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]b[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]f[/TD]
[TD="align: center"]18[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]d
[/TD]
[TD="align: center"]34[/TD]
[TD="align: center"]c[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]g
[/TD]
[TD="align: center"]31
[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]e
[/TD]
[TD="align: center"]28
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"][/TD]
[TD="align: center"]....[/TD]
[TD="align: center"][/TD]
[TD="align: center"]....[/TD]
[TD="align: center"][/TD]
[TD="align: center"]....[/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
Sheet1 (after update/append from Sheet2, with removed duplicates/same dates)
[TABLE="class: grid, align: center"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]...[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD]Product1
[/TD]
[TD][/TD]
[TD]Product5[/TD]
[TD][/TD]
[TD]Product4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]a[/TD]
[TD="align: center"] 13[/TD]
[TD]b[/TD]
[TD="align: center"]21[/TD]
[TD="align: center"]s[/TD]
[TD="align: center"]11[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]b[/TD]
[TD="align: center"]8[/TD]
[TD]f[/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]pq[/TD]
[TD="align: center"]31[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]c[/TD]
[TD="align: center"]12[/TD]
[TD]g
[/TD]
[TD="align: center"]31
[/TD]
[TD="align: center"]rd[/TD]
[TD="align: center"]11[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]e
[/TD]
[TD="align: center"]28
[/TD]
[TD][/TD]
[TD="align: center"][/TD]
[TD="align: center"]w[/TD]
[TD="align: center"]9[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD="align: center"]....[/TD]
[TD="align: center"][/TD]
[TD="align: center"].....[/TD]
[TD="align: center"]d
[/TD]
[TD="align: center"]34
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: center"]....[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Product's mark is characteristic which contains one to six letters (always to the left of price).
I need a Macro to copy/append data from Sheet2 to Sheet1 in an appropriate column (based on identical products columns). // something like hlookup function in macro
Also, I need to remove (if there are) duplicates based on mark columns (cells which already contains the same marks as marks in Sheet1).
Example.
Sheet1 (before update)
[TABLE="class: grid, align: center"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]...[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Product1[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Product5[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Product4
[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]a[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]b[/TD]
[TD="align: center"]21[/TD]
[TD="align: center"]s[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]b[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]f[/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]pq[/TD]
[TD="align: center"]31[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]c[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]rd[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]w[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
Sheet2 (obtained new "raw" data)
[TABLE="class: grid, align: center"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]...[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Product4[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Product1[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Product5
[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]w[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]b[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]f[/TD]
[TD="align: center"]18[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]d
[/TD]
[TD="align: center"]34[/TD]
[TD="align: center"]c[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]g
[/TD]
[TD="align: center"]31
[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]e
[/TD]
[TD="align: center"]28
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"][/TD]
[TD="align: center"]....[/TD]
[TD="align: center"][/TD]
[TD="align: center"]....[/TD]
[TD="align: center"][/TD]
[TD="align: center"]....[/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
Sheet1 (after update/append from Sheet2, with removed duplicates/same dates)
[TABLE="class: grid, align: center"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]...[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD]Product1
[/TD]
[TD][/TD]
[TD]Product5[/TD]
[TD][/TD]
[TD]Product4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]a[/TD]
[TD="align: center"] 13[/TD]
[TD]b[/TD]
[TD="align: center"]21[/TD]
[TD="align: center"]s[/TD]
[TD="align: center"]11[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]b[/TD]
[TD="align: center"]8[/TD]
[TD]f[/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]pq[/TD]
[TD="align: center"]31[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]c[/TD]
[TD="align: center"]12[/TD]
[TD]g
[/TD]
[TD="align: center"]31
[/TD]
[TD="align: center"]rd[/TD]
[TD="align: center"]11[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]e
[/TD]
[TD="align: center"]28
[/TD]
[TD][/TD]
[TD="align: center"][/TD]
[TD="align: center"]w[/TD]
[TD="align: center"]9[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD="align: center"]....[/TD]
[TD="align: center"][/TD]
[TD="align: center"].....[/TD]
[TD="align: center"]d
[/TD]
[TD="align: center"]34
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: center"]....[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Last edited: