I am very familiar with Microsoft Excel, but am new to VBA and macros. I am trying to clean up a workbook of mine to make data input much easier. Basically I am trying to figure out the code to take the information from Table 1 to update the appropriate item row in Table 2. I have created a command button titled "ADD SALES" to attach the macro to.
TABLE 1 - SHEET 1 [TABLE="border: 1, cellpadding: 1, width: 500"]
[tr][td]DATE:
[/td][td]1/20/18
[/td][/tr][tr][td]ITEM:
[/td][td]T-Shirt 1
[/td][/tr][tr][td]QTY SOLD:
[/td][td]20
[/td][/tr][tr][td]COMPS
[/td][td]1
[/td][/tr][tr][td]CREW SALES:
[/td][td]$5.00
[/td][/tr]
[/TABLE]
TABLE 2 - SHEET 2 [TABLE="border: 1, cellpadding: 1, width: 500"]
Item
[/td][td]Sold
[/td][td]Comps
[/td][td]Crew Sales
[/td][td]Last Updated
[/td][/tr][tr][td]T-Shirt 1
[/td][td]0
[/td][td]0
[/td][td]$0.00
[/td][td]1/1/18
[/td][/tr][tr][td]T-Shirt 2
[/td][td]0
[/td][td]0
[/td][td]$0.00
[/td][td]1/1/18
[/td][/tr][tr][td]Long Sleeve
[/td][td]0
[/td][td]0
[/td][td]$0.00
[/td][td]1/1/18
[/td][/tr][tr][td]Hoodie
[/td][td]0
[/td][td]0
[/td][td]$0.00
[/td][td]1/1/18
[/td][/tr]
[/TABLE]
So basically, I need to find a way to search Table 2 for the correct Item Name, then add the values from Table 1 to the appropriate cells in that row. So in this example, I am trying to add 20 Sales, 1 Comp and $5.00 in Crew Sales to "T-Shirt 1", and then update the "Last Updated" date to 1/20/18.
Any help or advice is greatly appreciated! Thank you.