VBA copy a few fields only from 1 sheet to another

dcavaiani

New Member
Joined
Mar 21, 2014
Messages
21
VBA Code:
Public Sub CopyRows()
    Sheets("Kaline").Select
    ' TRIED Sheets("Kaline").Range ("A7.c999, f7.f999")
    ' Find the last row of data
    FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
    ' Loop through each row
    For x = 2 To FinalRow
    ' TRIED Range ("A7:c999, f1:f999")
    ' TRIED .Cells.Select
                      Cells(x, 1).Resize(1, 33).Copy
            ' TRIED Cells.Copy
            Sheets("sheet1").Select
            NextRow = Cells(Rows.Count, 1).End(xlUp).Row + 1
            Cells(NextRow, 1).Select
            ActiveSheet.Paste
            Sheets("kaline").Select
    Next x
End Sub
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
What are you trying to copy? A whole range? Certain rows? Certain cells?
 
Upvote 0
What are you trying to copy? A whole range? Certain rows? Certain cells?
To break it down: 1st sheet contains baseball cards ROWS with a, b, c, d, e ,f, g, h columns named as: a=Team, b=Year, c=Card#, d=grade 1 value, e=grade 2 value, F=grade 3 value, G=grade 4 value, H=grade 5 value. The cards F, G, H column VALUES are garnered from FORMULAS/Averages of online Price Guides, which are found via other spreadsheet sheet formulas within the 1st sheet columns F, G, and H. Need to do several iterations with slight code modifications so that each iteration ADDS ONLY CERTAIN "RANGED" COLUMNS to the ROWS to the end of the copied to sheet.

I need to know how to modify it and run it again with slight modifications, where I will select the "next up" column to the right of 1st sheet instead e.g.: Sheets("kaline").Range("A:C,G:G") rather than ... Range("A:C, F:F"). One last thing, can I paste in a CONSTANT VALUE to the end of the columns I select.
 
Last edited:
Upvote 0
What are you trying to copy? A whole range? Certain rows? Certain cells?
I have this in 1st sheet: columns, a , b, c, d, e, F, G, H, and I want the copied sheet to break it down thusly: a, b, c, F, then ADD rows a, b, c, G, then ADD rows a, b, c, H, with the formula values of F, G, H included in the 2nd sheet.
 
Upvote 0

Forum statistics

Threads
1,215,093
Messages
6,123,068
Members
449,091
Latest member
remmuS24

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