Get rid of default range references in macro

LorneG

New Member
Joined
Aug 25, 2002
Messages
2
I am trying to work through a very simple formula that is repetitive for some large spreadsheets we are modifying. This was a snap in Lotus but with Excel I am suddenly macro illiterate but would still like to avoid carpal tunnel syndrome.

I created the macro to sub total rows "up" in a cell and then copy the formula across columns to te end of the column data. Backspace and then enter.

Then I need to move down to the next cell and repeat.(this part has to be manual process)
Now, it appears in excel that rather than let the macro execute from wherever the cursor is moved to, that it defines a range for the macro to use. Whyit defaults like this seems odd. None-the-less I have seen similar questions but need som direct help on this one.
Below is current code created by excel.

Sub Sum_up_paste_over()
'
' Sum_up_paste_over Macro
' Macro recorded 08.26.2002 by Lorne Ganten
'
' Keyboard Shortcut: Ctrl+l
'
Range("E779").Select
ActiveCell.FormulaR1C1 = "=SUM(R[-15]C:R[-1]C)"
Range("E779").Select
Selection.Copy
Range("F779:BG779").Select
ActiveSheet.Paste
End Sub

Appreciate whatever help you can provide.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Selection.formula = "insert formula here"

Use this instead of Range... etc...

Hope this helps
 
Upvote 0
Thanks for the info.
As I am a newbie to VLB where can I find the formulas to use for Lotus "endup" , "end over", "up1", etc and copy/paste equivalents
 
Upvote 0

Forum statistics

Threads
1,222,383
Messages
6,165,661
Members
451,983
Latest member
Raph24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top