![]() |
Copy Formula Code
Can anyone please give me a code that copies the preceeding cell and inserts
the formula only into the selected cell? |
Copy Formula Code
Define "preceding cell". Give specific examples of source and target cells. -- JBeaucaire ------------------------------------------------------------------------ JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=45556 |
Copy Formula Code
Did you want an identical copy of the formula (same range references)...
Selection.Formula = Selection.Offset(, -1).Formula Or did you want the range reference to update for their new location... Selection.Offset(, -1).Copy Selection -- Rick (MVP - Excel) "Nikki" wrote in message ... Can anyone please give me a code that copies the preceeding cell and inserts the formula only into the selected cell? |
Copy Formula Code
Some people do not realize that this site is visited by users from many
different countries and that some read from right to left and some read vertically. Even worse, preceding could infer the previously selected cell which could be anywhere. But the OP probably means the one to immediately to the left of the selection. "JBeaucaire" wrote: Define "preceding cell". Give specific examples of source and target cells. -- JBeaucaire ------------------------------------------------------------------------ JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=45556 |
Copy Formula Code
THis worked Thanks a bunch
"Rick Rothstein" wrote: Did you want an identical copy of the formula (same range references)... Selection.Formula = Selection.Offset(, -1).Formula Or did you want the range reference to update for their new location... Selection.Offset(, -1).Copy Selection -- Rick (MVP - Excel) "Nikki" wrote in message ... Can anyone please give me a code that copies the preceeding cell and inserts the formula only into the selected cell? |
All times are GMT +1. The time now is 02:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com