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 |
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 |
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. |
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 |
All times are GMT +1. The time now is 05:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com