Weeble
Board Regular
- Joined
- Nov 30, 2016
- Messages
- 95
- Office Version
- 365
I'm trying to make an inventory model. let's see if I can explain it.
This is "Sheet1"
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Article[/TD]
[TD="align: center"]Inventory[/TD]
[TD]stack[/TD]
[/TR]
[TR]
[TD]Fork[/TD]
[TD]500[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Spoon[/TD]
[TD]50[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]BBQ[/TD]
[TD]300[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Sallad[/TD]
[TD]23[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Computer[/TD]
[TD]6[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
I need a VBA macro that copies the first 2 columns IF 'Inventory' Collumn has a value of <= 50 , AND 'Stack' =1 .
So 'Article' and 'Inventory' row with a value of <= 50 AND stack =1. Copied to "Sheet2".
I will be doing this every day. So IF either in Column 'Article* already exists in "Sheet2" either overwrite that line with the new 'Inventory' number or Skip it, if overwrite is not possible.
Anyone able to help me with this? I have searched around for a while. But can't really find a macro that fits my needs. Any help would be very kind.
This is "Sheet1"
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Article[/TD]
[TD="align: center"]Inventory[/TD]
[TD]stack[/TD]
[/TR]
[TR]
[TD]Fork[/TD]
[TD]500[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Spoon[/TD]
[TD]50[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]BBQ[/TD]
[TD]300[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Sallad[/TD]
[TD]23[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Computer[/TD]
[TD]6[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
I need a VBA macro that copies the first 2 columns IF 'Inventory' Collumn has a value of <= 50 , AND 'Stack' =1 .
So 'Article' and 'Inventory' row with a value of <= 50 AND stack =1. Copied to "Sheet2".
I will be doing this every day. So IF either in Column 'Article* already exists in "Sheet2" either overwrite that line with the new 'Inventory' number or Skip it, if overwrite is not possible.
Anyone able to help me with this? I have searched around for a while. But can't really find a macro that fits my needs. Any help would be very kind.