Recalculate Range Name After Change

soteman2005

New Member
Joined
Nov 24, 2005
Messages
32
Hi,

I would like to create a macro that automatically runs to recalculate the named range "DC_subscriber_average" when anything on the sheet "Demand-Inputs" changes. I would be grateful if someone could point me in the right direction or write a quick macro for me.

Thanks

Adam
 

Some videos you may like

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
rightclick sheet tab & View Code.
You do, of course have Calculation set to Manual otherwise this is unnecessary ?

Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    ActiveSheet.Range("DC_subscriber_average").Calculate
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,119,264
Messages
5,577,076
Members
412,762
Latest member
sienweiw
Top