Copy Based on Multiple Cells Matching Across 2 worksheets

nspectorgadget

New Member
Joined
Apr 11, 2018
Messages
4
I have a work book with 2 worksheets. 1 Worksheet is my raw data. My Second Worksheet is Essentially a form that gets printed to fill out facility condition indexes for an entire campus.
I have everything else on my form completed to include when a row of the raw data gets updated, it will time stamp the row for last inspection.

The only update to that row I want is who conducted the inspection. On my worksheet, I have a spot (C4) for where the user inputs their name prior to printing. On the command of print, I want the macro to update their name from Sheet1 C4 to the correlating items and facility on the raw data worksheet (sheet2) Column I. Once these two events have completed, I want the document to Save because people at work do not know how to save. Below is exactly what I need to happe

1. IF Sheet1 ColumnB = Sheet2 ColumnC And
Sheet1 ColumnC = Sheet2 ColumnD And
Sheet1 Cell B18 = Sheet2 ColumnB Then
Copy Sheet1 ColumnH to Sheet2 ColumnI

**Cannot overwrite existing data when If statement is false

2. Print Worksheet1, Worksheet3 (Already functioning)

3. Save Entire Workbook

Does this make sense? Its a really big file and would need to be redacted. The key thing is that I am using an autofilter macro on Sheet1 and it is displaying only the lines I need for that facility using already inserted if statements. I think my If And is the sequence I am looking for, just really new to VBA and I think this is beyond my youtube knowledge. Thanks!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,215,429
Messages
6,124,838
Members
449,193
Latest member
MikeVol

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