View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_4_] Jim Thomlinson[_4_] is offline
external usenet poster
 
Posts: 1,119
Default Simple Division??

Give this a whirl

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrorHandler
If Target.Column < 19 And Target.Column 3 And _
IsNumeric(Target.Value) Then
Application.EnableEvents = False
Target.Value = Target.Value / Target.Offset(0, -(Target.Column - 3))
End If

ErrorHandler:
Application.EnableEvents = True
End Sub
--
HTH...

Jim Thomlinson


"Steve" wrote:

I have a spread sheet. I would like to take it and be able to put a number
in it and have it automatically give me a percentage. In other words column
C has to totals. Lets say C2 is 5 and I type in 1 into D2. Is there a way
to have it automatically change my 1 into 20%? I have to do this for columns
D through R and have it figure out a percentage based off the totals listed
in column C. I don't need to show "1" just the percentage of 1 and 5...
Confusing enough yet? Any help would be most appreciated :)