ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Self Calculation (https://www.excelbanter.com/new-users-excel/218869-self-calculation.html)

satya

Self Calculation
 
Is it possible to set a format to a cell so that if I enter a value it
returns with adding 15% to it. For example if in A1 I enter 100 it should
return 115 in cell A1. My gut feeling as a novice is it is not possible,
nevertheless wanna check with the wizards on line

Max

Self Calculation
 
Try the sheet sub below from Don Guilett (slightly adapted)

To install:
Right click on the sheet tab View code
Copy n paste the sub into the code window (whitespace on right)
Press Alt+Q to get back to Excel. Test it out on that sheet.

Private Sub Worksheet_Change(ByVal Target As Range)
'Don Guillett, adapted
If Intersect(Target, Columns("A")) Is Nothing Then Exit Sub
Application.EnableEvents = False
If IsNumeric(Target) Then Target = Target * 1.15
Application.EnableEvents = True
End Sub

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"Satya" wrote:
Is it possible to set a format to a cell so that if I enter a value it
returns with adding 15% to it. For example if in A1 I enter 100 it should
return 115 in cell A1. My gut feeling as a novice is it is not possible,
nevertheless wanna check with the wizards on line



All times are GMT +1. The time now is 12:34 PM.

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