By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,099 Members | 1,364 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,099 IT Pros & Developers. It's quick & easy.

Copy paste!!!!!!!!!!

P: 16
hello friends.!!!!!!!


How can I copy Excel's Cell value and paste it in another CELL.

I have to copy in range like
copy(range(a1:d1))

and then paster like
paste(range(a3:d3))

I need help ......

thanks in advance!!!!!!!!
Mar 28 '07 #1
Share this Question
Share on Google+
3 Replies


P: 16
DPK
anyone to help here with VBA????????????
Mar 28 '07 #2

SammyB
Expert 100+
P: 807
hello friends.!!!!!!!


How can I copy Excel's Cell value and paste it in another CELL.

I have to copy in range like
copy(range(a1:d1))

and then paster like
paste(range(a3:d3))

I need help ......

thanks in advance!!!!!!!!
If the ranges are the same size, you can just do "source.Copy destination" for example
Expand|Select|Wrap|Line Numbers
  1. Range("A1:D1").Copy Range("A2:D2")
but since you want to transpose, you must do a copy and then a PasteSpecial, Transpose just like you would manually in Excel. In code, this looks like:
Expand|Select|Wrap|Line Numbers
  1.     Range("A1:D1").Copy
  2.     Range("A3:A6").PasteSpecial Paste:=xlAll, Transpose:=True
  3.     Application.CutCopyMode = False
The way to figure this out is to record a macro, doing the operation, and then look at the code. HTH --Sam
Mar 28 '07 #3

P: 16
DPK
I soved my problem.
Thank Yoy very much SammyB!!!!!!!!!!!
:-)




If the ranges are the same size, you can just do "source.Copy destination" for example
Expand|Select|Wrap|Line Numbers
  1. Range("A1:D1").Copy Range("A2:D2")
but since you want to transpose, you must do a copy and then a PasteSpecial, Transpose just like you would manually in Excel. In code, this looks like:
Expand|Select|Wrap|Line Numbers
  1.     Range("A1:D1").Copy
  2.     Range("A3:A6").PasteSpecial Paste:=xlAll, Transpose:=True
  3.     Application.CutCopyMode = False
The way to figure this out is to record a macro, doing the operation, and then look at the code. HTH --Sam
Mar 29 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.