This is probably a question that has been brought up before, but I am
trying
to set up a cel that will contain a formula, BUT, that I can also enter
a
number in the cel and it will preform a caculation based on the
formula. In
other words, I want to set up D1 to be =D1 1.5, and when I enter 5 into
D1,
then 6.5 is what shows. Is this something I can do with a macro or
vba? Any help is appreciated.--
lagiant
------------------------------------------------------------------------
lagiant's Profile: www.excelforum.com/member.php...oamp;userid=34251
View this thread: www.excelforum.com/showthread...hreadid=540045Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Target.Value = Target.Value 1.5
Application.EnableEvents = True
End Sub
HTH
quot;lagiantquot; gt; wrote
in message :
gt; This is probably a question that has been brought up before, but I am
gt; trying
gt; to set up a cel that will contain a formula, BUT, that I can also enter
gt; a
gt; number in the cel and it will preform a caculation based on the
gt; formula. In
gt; other words, I want to set up D1 to be =D1 1.5, and when I enter 5 into
gt; D1,
gt; then 6.5 is what shows. Is this something I can do with a macro or
gt; vba? Any help is appreciated.
gt;
gt;
gt; --
gt; lagiant
gt; ------------------------------------------------------------------------
gt; lagiant's Profile: www.excelforum.com/member.php...oamp;userid=34251
gt; View this thread: www.excelforum.com/showthread...hreadid=540045
U¿ytkownik quot;lagiantquot; gt;
napisa³ w wiadomoœci
...
gt;
gt; This is probably a question that has been brought up before, but I am
gt; trying
gt; to set up a cel that will contain a formula, BUT, that I can also enter
gt; a
gt; number in the cel and it will preform a caculation based on the
gt; formula. In
gt; other words, I want to set up D1 to be =D1 1.5, and when I enter 5 into
gt; D1,
gt; then 6.5 is what shows. Is this something I can do with a macro or
gt; vba? Any help is appreciated.
gt;
gt;
gt; --
gt; lagiant
gt; ------------------------------------------------------------------------
gt; lagiant's Profile:
www.excelforum.com/member.php...oamp;userid=34251
gt; View this thread: www.excelforum.com/showthread...hreadid=540045
gt;
copy this sub into worksheet module
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = quot;$D$1quot; Then
Target.Value = Target.Value 1.5
End If
End Sub
mcg
- Nov 03 Mon 2008 20:47
Entering numbers in a cel formula
close
全站熱搜
留言列表
發表留言
留言列表

