Help with copy and pasting

J

JHL

Hello

I just recorded this copy and paste macro, but I would like to either

1.. place the cursor where I want to paste OR
2.. select the line in an input box
The pasting of the data will always be a different line in the Allocations
sheet.
Will someone give me some help please? Thanks.

Sub A()

Sheets("Budget").Select

Range("H3:H15").Select

Selection.Copy

I want to modify this area with either placing the cursor or input box

Sheets("Allocations").Select

Range("B55").Select

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _

False, Transpose:=True

End Sub
 
J

Jim Cone

Select a cell and run the macro...
Sub A()
Sheets("Budget").Range("H3:H15").Copy
ActiveCell.PasteSpecial Paste:=xlValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
Application.CutCopyMode = False
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"JHL" <[email protected]>
wrote in message
Hello
I just recorded this copy and paste macro, but I would like to either
1.. place the cursor where I want to paste OR
2.. select the line in an input box
The pasting of the data will always be a different line in the Allocations
sheet.
Will someone give me some help please? Thanks.

Sub A()

Sheets("Budget").Select

Range("H3:H15").Select

Selection.Copy

I want to modify this area with either placing the cursor or input box

Sheets("Allocations").Select

Range("B55").Select

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _

False, Transpose:=True

End Sub
 
J

JHL

Thank you.

Can I ask one more question?
After it pastes the data, how can I move the cursor 4 spaces to the right
from the end of the paste
i.e. paste range is B:N , move the cursor to cell col "R" on the same line
so I can paste two more items.

Thanks
 
J

JLGWhiz

Sub A()
Sheets("Budget").Range("H3:H15").Copy
ActiveCell.PasteSpecial Paste:=xlValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
Application.CutCopyMode = False
ActiveCell.End(xlToRight).Offset(0, 4).Activate
End Sub
 
J

JHL

Thanks again.

JLGWhiz said:
Sub A()
Sheets("Budget").Range("H3:H15").Copy
ActiveCell.PasteSpecial Paste:=xlValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
Application.CutCopyMode = False
ActiveCell.End(xlToRight).Offset(0, 4).Activate
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top