VBA Copy/Paste Rows to Other Sheet at Specific Row

MRM1980

New Member
Joined
Aug 6, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
My goal is to copy entire rows from one sheet (Estimate) to their respective categories in another sheet (Labor), based on values in Column C.
The code that I have now is preliminary and is currently only moving "FRA" items, as I plan to add the other categories when I get the code working.
The problem is that I cannot figure out how to get items to paste into specific rows on the destination sheet (Labor).
Here are screen shots of each sheet and a copy of my current code.
2020-08-06_7-46-12.png
2020-08-06_7-53-18.png


VBA Code:
Sub CopyRows()
 Dim bottomL As Integer
 Dim x As Integer
 bottomL = Sheets("Estimate").Range("C" & Rows.Count).End(xlUp).Row: x = 1
 
 Dim c As Range
 For Each c In Sheets("Estimate").Range("C1:C" & bottomL)
 If c.Value = "FRA" Then
 c.EntireRow.Copy Worksheets("Labor").Range("A" & x)
 x = x + 1
 End If
 Next c
 
End Sub
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,214,791
Messages
6,121,611
Members
449,038
Latest member
apwr

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