username142
New Member
- Joined
- May 30, 2014
- Messages
- 23
I've declared the variable 'Action' as a string, and I am assigning a range to it based upon the contents of a cell. For example, the first one being assigned is C52:CY55. And I'm trying to insert that range into the formula below using the variable name, but it's not working. In the formula that's inserted to the active cell, the range is posting as $AZ:$AZ:'CY55' instead. Does anyone have any suggestions?
Code:
ActiveCell.Formula = _
"=SUM(INDEX('" & CurrentSheet & "'!" & Action & ",,COLUMN()+Summary!RC[-1]-2))"