ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How can I automatically have 10% added to cell after typing a valu (https://www.excelbanter.com/excel-worksheet-functions/7837-how-can-i-automatically-have-10%25-added-cell-after-typing-valu.html)

cjrolls

How can I automatically have 10% added to cell after typing a valu
 
Hello Is there any way to have excel 2000 automatically enter the new amount
in same cell of what i type plus GST of 10 %. e.g I type 10.46 in to cell and
when I push enter excel replaces it with 11.506
Many thanks


Something like
Private Sub Worksheet_Change(ByVal Target As Range)


If Target.Column = 3 Then ' onl;y column C
Application.EnableEvents = False
Target = Target * 1.1
Application.EnableEvents = True
End If


End Sub



Nick Hodge

You could using a worksheet_change() event like so (This works in column A).
To implement go to http://www.nickhodge.co.uk/vba/vbaim....htm#EventCode

Private Sub Worksheet_Change(ByVal Target As Range)
With Application
If Not .Intersect(Target, Columns("A:A")) Is Nothing Then
..EnableEvents = False
Target.Value = Target.Value * 1.1
..EnableEvents = True
End If
End With
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"cjrolls" wrote in message
...
Hello Is there any way to have excel 2000 automatically enter the new
amount
in same cell of what i type plus GST of 10 %. e.g I type 10.46 in to cell
and
when I push enter excel replaces it with 11.506
Many thanks




Tushar Mehta

You have already received possible solutions to your question. Since I
am not a big fan of (a)VBA when a non-VBA solution works, (b) automated
changes to user data entry, and (c) especially those made without any
audit trail, here's a non-VBA solution.

Suppose the person enters data in column A. Then, in column B2 enter
the formula =A2*1.1 and label column B as 'Price with GST'

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Multi-disciplinary business expertise
+ Technology skills
= Optimal solution to your business problem
Recipient Microsoft MVP award 2000-2005

In article ,
says...
Hello Is there any way to have excel 2000 automatically enter the new amount
in same cell of what i type plus GST of 10 %. e.g I type 10.46 in to cell and
when I push enter excel replaces it with 11.506
Many thanks



All times are GMT +1. The time now is 03:49 AM.

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