Automatically multiply be a number.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to set every cell that I enter a number into to automatically multiply
that number by 15% which is also (1.15). So no matter what number I put in
the cell it will automatically multiply that number by (1.15). Is there a
way that I can have it automatically mutliply without having to put the
formula in each and every cell????????
 
Put this in a worksheet module (right click sheet tab and select view code
and paste it

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
With Target
If .Column = 1 Then
.Value = .Value * 1.15
End If
End With
ws_exit:
Application.EnableEvents = True
End Sub

will work for all values in column A

--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top