VBA Help please - cut/paste special/transpose

Status
Not open for further replies.

chef

Well-known Member
Joined
Jul 10, 2002
Messages
610
Office Version
  1. 365
  2. 2016
Hi,
I'm not that great with VBA but trying to piece together from learning on utube etc

I have a worksheet called "Pay" and and another worksheet called "Trend"

I want to copy figures and formats from "Pay" range J2:12 and then copy paste special them in the next available blank rows in "Trend" in columns D:N, but also transpose the column data in "pay" to rows in "Trend"

I've tried the following but I need to find the next blank row in "trend" and hoping this makes sense to someone.
Using O365

What I have tried but not gluing together nor fully understanding as Im not sure how to code the next available row into this

sub CopyData()
Worksheets("Pay").Range("J2:J12")
Selection.copy
Worksheets("Trend").Range(D29:N29.Select)
Selection.PasteSpecialPaste:=xlPasteValues,Transpose:=True
Application.CutCopyMode=False

End Sub

Can someone please give me a nudge in the right direction as I want to attach this to a button and just click to have updated automatically each week when the pay figures change
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
my apologies for the duplicate thread - I did not think the first one was sent
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,215,237
Messages
6,123,805
Members
449,127
Latest member
Cyko

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