thomasbeard
Board Regular
- Joined
- Oct 19, 2005
- Messages
- 139
I have the following VB code that will create a sum formula that will add everything directly to the left:
Activecell.FormulaR1C1 = "=SUM(RC[-1]:" & ActiveCell.End(xlToLeft).Address(ReferenceStyle:=xlR1C1) & ")"
However it comes out in the format:
SUM($A1:E$1)
whereas it needs to be in the format
SUM(A1:E1)
Can someone please help me fix this? Thanks
Tom
Activecell.FormulaR1C1 = "=SUM(RC[-1]:" & ActiveCell.End(xlToLeft).Address(ReferenceStyle:=xlR1C1) & ")"
However it comes out in the format:
SUM($A1:E$1)
whereas it needs to be in the format
SUM(A1:E1)
Can someone please help me fix this? Thanks
Tom