Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy formulas exact without references changing


Trying to come up with a VBA procedure to copy a cell formula exact into
the clipboard that I can paste (cntrl+V) in any other desired cells
without the references changing. That way, I can assign the keys
Shift+Ctrl+E to the procedure for a short cut. I know about the $ but
there are too many formulas to edit.

I now do it manually as follows:
On the desired cell, F2
Ctrl + Shift + Home
Ctrl + C
Esc

Any ideas?

mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=482978

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Copy formulas exact without references changing

"mikeburg" wrote in
message ...

Trying to come up with a VBA procedure to copy a cell formula exact into
the clipboard that I can paste (cntrl+V) in any other desired cells
without the references changing. That way, I can assign the keys
Shift+Ctrl+E to the procedure for a short cut. I know about the $ but
there are too many formulas to edit.

I now do it manually as follows:
On the desired cell, F2
Ctrl + Shift + Home
Ctrl + C
Esc

Any ideas?

mikeburg


Dim A as String
A = [B50].Formula

Ciao
Bruno


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Copy formulas exact without references changing

You can change from relative to absolute en masse using VBA

Sub Absolute()
Dim Cell As Range
For Each Cell In Selection
If Cell.HasFormula Then
Cell.Formula = Application.ConvertFormula(Cell.Formula, _
xlA1, xlA1, xlAbsolute)
End If
Next
End Sub


Gord Dibben Excel MVP



. I know about the $ but
there are too many formulas to edit.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy formulas exact without references changing


Ciao Bruno's vba code works great. But how do I get the contents of
variable A into the clipboard?

Thanks a million, mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=482978

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
copy an exact formula without changing cell reference Vidal Excel Worksheet Functions 1 September 5th 09 09:48 AM
Changing References to Formulas Tracia B Excel Discussion (Misc queries) 1 June 15th 09 04:04 PM
copying formulas and changing cell references mainsol Excel Discussion (Misc queries) 3 February 9th 09 09:42 AM
Copy and Replicate exact formulas Richhall Excel Worksheet Functions 4 October 8th 07 03:08 PM
Changing Cell References in Formulas Pat Excel Worksheet Functions 2 December 15th 04 05:29 PM


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