Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 213
Default Macro to COPY FORMULA BETWEEN RANGES

I have a vlookup under inventory, orders & POs, I need to copy and paste it
to the end of that range, then go to the next section and paste. This need to
continue through many different ranges, and the number of rows could change.
Any ideas.

I did name the ranges ie "tissue", and "paper towels", maybe there is a way
to copy formula from 1st row throughout all range names, but that still
leaves the remaining rows in the first range.

Any help would be appreciated

Paper Products - WASHROOM TISSUE
Proteus Open Open
Description Inventory Orders P.O.s
11375 RESPONSE 241 1154 1100
11440 RESPONSE
14800 ECO SOFT


Paper Products - PAPER TOWELS
Proteus Open Open
Description Inventory Orders P.O.s
RK600E ROLL - BROWN
SK1850A SINGLEFOLD-BROWN

--
Randy
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Macro to COPY FORMULA BETWEEN RANGES

This little macro takes the formula in the first cell in a pre-defined range
and copies it to the other cells in that range:

Sub CopyDemo()
Dim r1 As Range, r2 As Range
Set r2 = Range("SampleRange")
Set r1 = r2(1)
r1.Copy
r2.PasteSpecial Paste:=xlPasteFormulas
End Sub

You would need to loop over your other Named Ranges.
--
Gary''s Student - gsnu201003


"Randy" wrote:

I have a vlookup under inventory, orders & POs, I need to copy and paste it
to the end of that range, then go to the next section and paste. This need to
continue through many different ranges, and the number of rows could change.
Any ideas.

I did name the ranges ie "tissue", and "paper towels", maybe there is a way
to copy formula from 1st row throughout all range names, but that still
leaves the remaining rows in the first range.

Any help would be appreciated

Paper Products - WASHROOM TISSUE
Proteus Open Open
Description Inventory Orders P.O.s
11375 RESPONSE 241 1154 1100
11440 RESPONSE
14800 ECO SOFT


Paper Products - PAPER TOWELS
Proteus Open Open
Description Inventory Orders P.O.s
RK600E ROLL - BROWN
SK1850A SINGLEFOLD-BROWN

--
Randy

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
How do I copy formula but only increment certain ranges? Martc Excel Discussion (Misc queries) 8 February 4th 10 11:01 PM
Macro to Copy Var. Ranges to Var. Rows Cmims Excel Discussion (Misc queries) 0 November 3rd 09 08:33 PM
how copy formula that contains ranges so ranges do not overlap Patty Excel Worksheet Functions 1 November 20th 08 04:15 PM
Using macro/vba to copy varying ranges of rows BCLivell Excel Discussion (Misc queries) 3 June 6th 07 02:52 PM


All times are GMT +1. The time now is 11:31 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"