View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default I am looking for a imple formula for excel i need Cloumn be to

There would be a problem with the .enableevents setting if two cells got
changed:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
Application.EnableEvents = False
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

Gord Dibben wrote:

You would need event code to have that happen without formulas or helper cells.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
Application.EnableEvents = False
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the above into that sheet module.

Enter a number in column B and it gets multiplied by 1.131

No formulas or helper cells.

Gord Dibben MS Excel MVP

On Tue, 19 Dec 2006 14:08:01 -0800, help wrote:

Hi no I had tried those two ways, but I know t here is a way I remeber
learning, i need wahtever number i enter into column B to always mutlpy by
1.131 and I need the cell to only showw the answer of the calculation


"RichardSchollar" wrote:

Hi

Two ways come to mind: type whatver multiple number in a cell, and copy
the cell and select column B and go EditPasteSpecialMultiply, or use
the following formaula in an adjacent column and copy down:

=B1*number

replace number with whatever.

Hope this helps!

Richard


help wrote:
Hi there, my brain has gone to mush but i need my column B to be mulitplied
by the same number



--

Dave Peterson