ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Automatically multiply be a number. (https://www.excelbanter.com/excel-worksheet-functions/82049-automatically-multiply-number.html)

lee lee

Automatically multiply be a number.
 
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????????

Peo Sjoblom

Automatically multiply be a number.
 
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




"lee lee" <lee wrote in message
...
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????????




All times are GMT +1. The time now is 07:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com