View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
K[_2_] K[_2_] is offline
external usenet poster
 
Posts: 557
Default Putting Formula in all cells give Circular Reference. Please help

Hi rick, thanks for replying. i change you macro little bit but its
not working. i dont need whole column as i just need to specify the
ranges. any suggestion why its not working?

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("D18:F23,D26:F31,D35:F37,D40:F44"))
Is Nothing Then
On Error GoTo Whoops
Application.EnableEvents = False
Select Case Target.Column
Case 1
Target.Offset(, 1) = Target * 52 / 12
Target.Offset(, 2) = Target / 37
Case 2
Target.Offset(, -1) = Target * 12 / 52
Target.Offset(, 1) = Target * 12 / (37 * 52)
Case 3
Target.Offset(, -2) = 37 * Target
Target.Offset(, -1) = 37 * 52 * Target / 12
End Select
End If
Whoops:
Application.EnableEvents = True
End Sub