VBA Code - Compare and copy data to another sheet

Aquila

New Member
Joined
Feb 15, 2021
Messages
1
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Afternoon all
First time poster so I m hoping you can help me out.

I have a spreadsheet and I need the Command Button to do the following

1. Create a new Sheet with a DATE as the Tab title
2. Copy the NEW Stock on Hand to the SOH sheet from the Order Sheet
3. clear the Order sheet for use the next day.

I've got the Date and Clearing of the sheet part down pat, but I need it to look at the SHEET "Order Sheet, Compare the Number in cells A4 to A27 to the data in the SOH sheet Cells A2 through to A69 and then when matched the total Quantity from the matched A column number to the SOH sheet Column C.

I hope that makes sense….

Here is what I have


Hope someone can help me out if possible
 

Attachments

  • Code so far.PNG
    Code so far.PNG
    17.9 KB · Views: 12
  • Order Sheet.PNG
    Order Sheet.PNG
    67.9 KB · Views: 12
  • SOH Sheet.PNG
    SOH Sheet.PNG
    94 KB · Views: 12

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
It is hard to work with pictures. It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of both sheets. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).
 
Upvote 0

Forum statistics

Threads
1,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top