Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
lagiant
 
Posts: n/a
Default Entering numbers in a cel formula


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: http://www.excelforum.com/member.php...o&userid=34251
View this thread: http://www.excelforum.com/showthread...hreadid=540045

  #2   Report Post  
Posted to microsoft.public.excel.misc
JimMay
 
Posts: n/a
Default Entering numbers in a cel formula

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Target.Value = Target.Value + 1.5
Application.EnableEvents = True
End Sub

HTH

"lagiant" wrote
in message :

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: http://www.excelforum.com/member.php...o&userid=34251
View this thread: http://www.excelforum.com/showthread...hreadid=540045


  #3   Report Post  
Posted to microsoft.public.excel.misc
Gazeta
 
Posts: n/a
Default Entering numbers in a cel formula


Użytkownik "lagiant"
napisał w wiadomości
...

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:

http://www.excelforum.com/member.php...o&userid=34251
View this thread: http://www.excelforum.com/showthread...hreadid=540045


copy this sub into worksheet module
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$D$1" Then
Target.Value = Target.Value + 1.5
End If
End Sub
mcg


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 09:02 PM
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Excel Worksheet Functions 3 January 19th 06 10:52 AM
Entering Same Formula to A Full Staring from Say Row 5 Column..... Dermot Excel Worksheet Functions 4 November 16th 05 10:56 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 05:37 PM
entering matrix formula Christian Excel Worksheet Functions 3 November 24th 04 05:36 PM


All times are GMT +1. The time now is 04:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"