Good morning everyone. I have a piece of code (pasted below - Excel 365) and the code works fine for the entire row. However, I became curious and started looking around and have not been able to find an answer to this: In the code below a specific value is searched for in a column C and if located copies the entire row and pastes it on another page. What I became curious about is what if I didn't want to paste the entire row. But let's say that once a matching value is found I only want to paste what shows up in that same row but only Column A, Column D, Column H, Column L and move it to another sheet. I know I can do this with using an offset and running through the code so that it moves everything over one column at a time but I just couldn't figure out a way to streamline that. I have 79 Columns in the Data worksheet which has to stay intact but I only need 12 of them to review so I was working on a quick view page where I am using dropdown comboboxes to select the value to pull over.
Sheets("Sheet1").Select
Last = Cells(Rows.Count, "C").End(xlUp).Row
For i = Last To 1 Step -1
If (Cells(i, "C").Value) = Sheets("Sheet2").Range("C2") Then
Cells(i, "C").EntireRow.Copy
Sheets("Sheet2").Select
Any help would be greatly appreciated.
Thanks
Sheets("Sheet1").Select
Last = Cells(Rows.Count, "C").End(xlUp).Row
For i = Last To 1 Step -1
If (Cells(i, "C").Value) = Sheets("Sheet2").Range("C2") Then
Cells(i, "C").EntireRow.Copy
Sheets("Sheet2").Select
Any help would be greatly appreciated.
Thanks