Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy formula
I want to create a macro that will copy a range of formulas and the paste
them into a new range keeping all cell references absolute. I can accomplish this in vba using: ..Range("A11:D20").Formula = .Range("A1:D10").Formula But then I need to have a screen to get the source and target ranges. Is there a way to copy and then paste special (my vba special) absolute references on paste command? Like Ctrl C to copy and then Ctrl Z to paste the exact formulas instead of Ctrl V to paste relative formulas? I don't want to add $ signs and sometimes it isn't practicle. Thanks, Dave Thanks for the help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy formula
Hi Dave,
One way: Select your cells with formulas to copy Press Ctrl+H (or go to menu EditReplace) and replace "=" with "'=" Copy your cells in a normal way (Ctrl+C, Ctrl+V) Select your new cells with formulas Press Ctrl+H and replace "'=" with "=" Regards, KL "dave k" wrote in message ... I want to create a macro that will copy a range of formulas and the paste them into a new range keeping all cell references absolute. I can accomplish this in vba using: .Range("A11:D20").Formula = .Range("A1:D10").Formula But then I need to have a screen to get the source and target ranges. Is there a way to copy and then paste special (my vba special) absolute references on paste command? Like Ctrl C to copy and then Ctrl Z to paste the exact formulas instead of Ctrl V to paste relative formulas? I don't want to add $ signs and sometimes it isn't practicle. Thanks, Dave Thanks for the help. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy formula
Thanks. I have seen this example. I believe you meant to write "replace '='
with '#'". I would still like to have a vba function so that I can give this to some coworkers who will forget the steps. Thanks again. "KL" wrote: Hi Dave, One way: Select your cells with formulas to copy Press Ctrl+H (or go to menu EditReplace) and replace "=" with "'=" Copy your cells in a normal way (Ctrl+C, Ctrl+V) Select your new cells with formulas Press Ctrl+H and replace "'=" with "=" Regards, KL "dave k" wrote in message ... I want to create a macro that will copy a range of formulas and the paste them into a new range keeping all cell references absolute. I can accomplish this in vba using: .Range("A11:D20").Formula = .Range("A1:D10").Formula But then I need to have a screen to get the source and target ranges. Is there a way to copy and then paste special (my vba special) absolute references on paste command? Like Ctrl C to copy and then Ctrl Z to paste the exact formulas instead of Ctrl V to paste relative formulas? I don't want to add $ signs and sometimes it isn't practicle. Thanks, Dave Thanks for the help. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy formula
Hi Dave,
Although, it doesn't make a lot of difference, I meant what I wrote "replace "=" with "'=" (there is an apostrophe in the latter) which is the most common way of converting values/formulas to text. Regards, KL "dave k" wrote in message ... Thanks. I have seen this example. I believe you meant to write "replace '=' with '#'". I would still like to have a vba function so that I can give this to some coworkers who will forget the steps. Thanks again. "KL" wrote: Hi Dave, One way: Select your cells with formulas to copy Press Ctrl+H (or go to menu EditReplace) and replace "=" with "'=" Copy your cells in a normal way (Ctrl+C, Ctrl+V) Select your new cells with formulas Press Ctrl+H and replace "'=" with "=" Regards, KL "dave k" wrote in message ... I want to create a macro that will copy a range of formulas and the paste them into a new range keeping all cell references absolute. I can accomplish this in vba using: .Range("A11:D20").Formula = .Range("A1:D10").Formula But then I need to have a screen to get the source and target ranges. Is there a way to copy and then paste special (my vba special) absolute references on paste command? Like Ctrl C to copy and then Ctrl Z to paste the exact formulas instead of Ctrl V to paste relative formulas? I don't want to add $ signs and sometimes it isn't practicle. Thanks, Dave Thanks for the help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy formula result (text) only - without copying formula | Excel Discussion (Misc queries) | |||
I copy a formula and the results copy from the original cell | Excel Discussion (Misc queries) | |||
copy formula down a column and have cell references change within formula | New Users to Excel | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
Copy formula so destination displays formula as text | Excel Discussion (Misc queries) |