Copy and paste 13 columns across from one sheet to another

bgonen

Active Member
Joined
Oct 24, 2009
Messages
264
Looks like I'm stuck with these commands;I'm trying to separate the data (in structure tab) and execute the commands in "TMHP-PL" tab


Sub CopyPasteAcrossColumnsFINAL()
Dim LR As Long, i As Long
Application.ScreenUpdating = False
With Sheets("structure")
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
.Range("A" & i).Copy
.Sheets("TMHP-PL") = Cells(3, 1 * i + 1).Resize(, 13)
Next i
End With
End Sub
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I think it should be more like

Code:
Sub CopyPasteAcrossColumnsFINAL()
Dim LR As Long, i As Long
Application.ScreenUpdating = False
With Sheets("structure")
    LR = .Range("A" & Rows.Count).End(xlUp).Row
    For i = 1 To LR
        .Range("A" & i).Copy Destination:=Sheets("TMHP-PL").Cells(3, 14 * i + 3).Resize(, 13)
    Next i
End With
End Sub
 
Upvote 0
It works fine
but I'm struggling to change the start cell from P3 i.e (.Cells(3, 14 * i + 3)

to B3,,,

Is there a way to simplify this command?
Thanks
 
Upvote 0
Is it?

Code:
Sub CopyPasteAcrossColumnsFINAL()
Dim LR As Long, i As Long
Application.ScreenUpdating = False
With Sheets("structure")
    LR = .Range("A" & Rows.Count).End(xlUp).Row
    For i = 1 To LR
        .Range("A" & i).Copy Destination:=Sheets("TMHP-PL").Cells(3, 14.5 * i = 2.667).Resize(, 13)
    Next i
End With
End Sub
 
Upvote 0
sorry, something wrong I get an application define error
I apologize,,, maybe I didn't explain myself clear;

with this procedure:

.Range("A" & i).Copy Destination:=Sheets("TMHP-PL").Cells(3, 14 * i + 2).Resize(, 13)
I am able to copy the data starting at cell P3
But if I want to start from cell B3 then I had changed the command as follow:

.Range("A" & i).Copy Destination:=Sheets("TMHP-PL").Cells(3, 1 * i + 1).Resize(, 13)
But then I get awkward results
 
Upvote 0
Sorry I had a typo plus my equation was wrong

Code:
Sub CopyPasteAcrossColumnsFINAL()
Dim LR As Long, i As Long
Application.ScreenUpdating = False
With Sheets("structure")
    LR = .Range("A" & Rows.Count).End(xlUp).Row
    For i = 1 To LR
        .Range("A" & i).Copy Destination:=Sheets("TMHP-PL").Cells(3, 14 * i - 12).Resize(, 13)
    Next i
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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