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!
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!