unknownymous
Board Regular
- Joined
- Sep 19, 2017
- Messages
- 249
- Office Version
- 2016
- Platform
- Windows
Hi Excel Gurus,
I'm working on an macro project and almost done. I'm just having a problem on this: I have 2 excel sheet, one is working file and the other is database. What the macro needs to do is to check the cell with blank category (in working file) and add below column data in the database (next blank cell).
1) Merged Name
2) Addr
3) Code
*Working File Excel Sheet (Working tab)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Ref[/TD]
[TD]Merged Name[/TD]
[TD]Name 1[/TD]
[TD]Name 2[/TD]
[TD]Addr[/TD]
[TD]Code[/TD]
[TD]Quantity[/TD]
[TD]Category[/TD]
[/TR]
[TR]
[TD]001[/TD]
[TD]Sean Smith[/TD]
[TD]Sean[/TD]
[TD]Smith[/TD]
[TD]LA[/TD]
[TD]111[/TD]
[TD]5000[/TD]
[TD]Included[/TD]
[/TR]
[TR]
[TD]002[/TD]
[TD]Ian Grop[/TD]
[TD]Ian[/TD]
[TD]Grop[/TD]
[TD]SA[/TD]
[TD]125[/TD]
[TD]4500[/TD]
[TD]Excluded[/TD]
[/TR]
[TR]
[TD]003[/TD]
[TD]Lea Mason[/TD]
[TD]Lea[/TD]
[TD]Mason[/TD]
[TD]AM[/TD]
[TD]116[/TD]
[TD]4000[/TD]
[TD]For Review[/TD]
[/TR]
[TR]
[TD]004[/TD]
[TD]Tricia Javier[/TD]
[TD]Tricia[/TD]
[TD]Javier[/TD]
[TD]MT[/TD]
[TD]102[/TD]
[TD]3000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]005[/TD]
[TD]Den Berthe[/TD]
[TD]Den[/TD]
[TD]Berthe[/TD]
[TD]BE[/TD]
[TD]115[/TD]
[TD]2500[/TD]
[TD]Excluded[/TD]
[/TR]
[TR]
[TD]006[/TD]
[TD]Mae Lim[/TD]
[TD]Mae[/TD]
[TD]Lim[/TD]
[TD]AB[/TD]
[TD]136[/TD]
[TD]2000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]007[/TD]
[TD]Oscar Charde[/TD]
[TD]Oscar[/TD]
[TD]Charde[/TD]
[TD]CH[/TD]
[TD]140[/TD]
[TD]1000[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
*Database Excel Sheet (Database tab)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Account[/TD]
[TD]Data 1[/TD]
[TD]Merged Name[/TD]
[TD]Data 2[/TD]
[TD]Addr[/TD]
[TD]x[/TD]
[TD]Code[/TD]
[TD]xx[/TD]
[TD]xxx[/TD]
[TD]Category[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Sean Smith[/TD]
[TD][/TD]
[TD]LA[/TD]
[TD][/TD]
[TD]111[/TD]
[TD][/TD]
[TD][/TD]
[TD]Included[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Ian Grop[/TD]
[TD][/TD]
[TD]SA[/TD]
[TD][/TD]
[TD]125[/TD]
[TD][/TD]
[TD][/TD]
[TD]Excluded[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Lea Mason[/TD]
[TD][/TD]
[TD]AM[/TD]
[TD][/TD]
[TD]116[/TD]
[TD][/TD]
[TD][/TD]
[TD]For Review[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Den Berthe[/TD]
[TD][/TD]
[TD]BE[/TD]
[TD][/TD]
[TD]115[/TD]
[TD][/TD]
[TD][/TD]
[TD]Excluded[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any help will be much appreciated.
I'm working on an macro project and almost done. I'm just having a problem on this: I have 2 excel sheet, one is working file and the other is database. What the macro needs to do is to check the cell with blank category (in working file) and add below column data in the database (next blank cell).
1) Merged Name
2) Addr
3) Code
*Working File Excel Sheet (Working tab)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Ref[/TD]
[TD]Merged Name[/TD]
[TD]Name 1[/TD]
[TD]Name 2[/TD]
[TD]Addr[/TD]
[TD]Code[/TD]
[TD]Quantity[/TD]
[TD]Category[/TD]
[/TR]
[TR]
[TD]001[/TD]
[TD]Sean Smith[/TD]
[TD]Sean[/TD]
[TD]Smith[/TD]
[TD]LA[/TD]
[TD]111[/TD]
[TD]5000[/TD]
[TD]Included[/TD]
[/TR]
[TR]
[TD]002[/TD]
[TD]Ian Grop[/TD]
[TD]Ian[/TD]
[TD]Grop[/TD]
[TD]SA[/TD]
[TD]125[/TD]
[TD]4500[/TD]
[TD]Excluded[/TD]
[/TR]
[TR]
[TD]003[/TD]
[TD]Lea Mason[/TD]
[TD]Lea[/TD]
[TD]Mason[/TD]
[TD]AM[/TD]
[TD]116[/TD]
[TD]4000[/TD]
[TD]For Review[/TD]
[/TR]
[TR]
[TD]004[/TD]
[TD]Tricia Javier[/TD]
[TD]Tricia[/TD]
[TD]Javier[/TD]
[TD]MT[/TD]
[TD]102[/TD]
[TD]3000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]005[/TD]
[TD]Den Berthe[/TD]
[TD]Den[/TD]
[TD]Berthe[/TD]
[TD]BE[/TD]
[TD]115[/TD]
[TD]2500[/TD]
[TD]Excluded[/TD]
[/TR]
[TR]
[TD]006[/TD]
[TD]Mae Lim[/TD]
[TD]Mae[/TD]
[TD]Lim[/TD]
[TD]AB[/TD]
[TD]136[/TD]
[TD]2000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]007[/TD]
[TD]Oscar Charde[/TD]
[TD]Oscar[/TD]
[TD]Charde[/TD]
[TD]CH[/TD]
[TD]140[/TD]
[TD]1000[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
*Database Excel Sheet (Database tab)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Account[/TD]
[TD]Data 1[/TD]
[TD]Merged Name[/TD]
[TD]Data 2[/TD]
[TD]Addr[/TD]
[TD]x[/TD]
[TD]Code[/TD]
[TD]xx[/TD]
[TD]xxx[/TD]
[TD]Category[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Sean Smith[/TD]
[TD][/TD]
[TD]LA[/TD]
[TD][/TD]
[TD]111[/TD]
[TD][/TD]
[TD][/TD]
[TD]Included[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Ian Grop[/TD]
[TD][/TD]
[TD]SA[/TD]
[TD][/TD]
[TD]125[/TD]
[TD][/TD]
[TD][/TD]
[TD]Excluded[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Lea Mason[/TD]
[TD][/TD]
[TD]AM[/TD]
[TD][/TD]
[TD]116[/TD]
[TD][/TD]
[TD][/TD]
[TD]For Review[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Den Berthe[/TD]
[TD][/TD]
[TD]BE[/TD]
[TD][/TD]
[TD]115[/TD]
[TD][/TD]
[TD][/TD]
[TD]Excluded[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any help will be much appreciated.