Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col A
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 Then
With Target
If .Value <> "" Then
.Value = .Value * 1.4
End If
End With
End If
enditall:
Application.EnableEvents = True
End Sub
This is sheet event code. Right-click on the sheet tab and "View Code".
Copy/paste into that sheet module. Alt + q to return to Excel window.
NOTE: there will be no error checking or "paper trail" with this automatic
method.
You might do better with entering values in one column and have a helper column
show the 40% increase.
Enter prices in Column A
In B1 enter =IF(A1="","",A1*1.4) and copy down as far as you wish.
Gord Dibben MS Excel MVP
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.