Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default copy then paste to multiple ranges

Hi,

I use the code below to copy formulas to additional cells. However, i
want to paste the copied formulas into multiple ranges instead of copy/
paste copy/paste etc. Can this be done?

Range("A1").copy Range("B1:B10")

I thought something like this but it doesnt work...

Range("A1").copy Range("B1:B10"), Range("F12:F45")


Any ideas?

Kind regards,
Matt
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default copy then paste to multiple ranges

see if this works for you:

myformula = Range("A1").Formula
Range("B1:B10,F12:F45").Formula = myformula
--
jb


"MJKelly" wrote:

Hi,

I use the code below to copy formulas to additional cells. However, i
want to paste the copied formulas into multiple ranges instead of copy/
paste copy/paste etc. Can this be done?

Range("A1").copy Range("B1:B10")

I thought something like this but it doesnt work...

Range("A1").copy Range("B1:B10"), Range("F12:F45")


Any ideas?

Kind regards,
Matt

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default copy then paste to multiple ranges

this probably isn't what you want, but............. once you have it
copied, you can paste it multiple times........
'=====================
Sub multiple_paste()

ActiveSheet.Range("b2").Copy

ActiveSheet.Range("b4").PasteSpecial xlPasteAll
ActiveSheet.Range("b8").PasteSpecial xlPasteAll
ActiveSheet.Range("b10").PasteSpecial xlPasteAll

Application.CutCopyMode = False

End Sub
'======================
hope it helps!
:)
susan



On Oct 15, 8:18*am, MJKelly wrote:
Hi,

I use the code below to copy formulas to additional cells. *However, i
want to paste the copied formulas into multiple ranges instead of copy/
paste copy/paste etc. *Can this be done?

Range("A1").copy Range("B1:B10")

I thought something like this but it doesnt work...

Range("A1").copy Range("B1:B10"), Range("F12:F45")

Any ideas?

Kind regards,
Matt


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I copy big ranges of cells without drag or copy/paste? Ricardo Julio Excel Discussion (Misc queries) 3 March 23rd 10 02:38 PM
Copy & paste ranges from 1 wkbk to another Diddy Excel Programming 1 September 2nd 08 07:35 PM
Copy and paste Named Ranges Robert H Excel Programming 6 February 6th 07 04:13 PM
Copy paste ranges from multiple sheets Woody1313 Excel Programming 2 January 30th 06 03:37 PM
Copy and Paste ranges between files dude Excel Programming 3 July 23rd 03 01:37 PM


All times are GMT +1. The time now is 10:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"