LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Command to change the value of a cell within same cell

Right click the sheet tabview codecopy/paste all of this. Now when you
enter a number in a5 it will do as desired. To start over enter a zero


Option Explicit
Dim oldvalue As Double

Private Sub Worksheet_Change(ByVal target As Excel.Range)
If target.Address = "$A$5" Then
On Error GoTo fixit
Application.EnableEvents = False
If target.Value = 0 Then oldvalue = 0
target.Value = 1 * target.Value + oldvalue
oldvalue = target.Value
fixit:
Application.EnableEvents = True
End If
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

" wrote in
message ...
I know it's rather hard to describe but I'll try. Say you have values in
Column A to which you want to add $50 to. Rather than inserting a formula
in
a different column of =A1+50, I want to insert the command to increase the
cell in Column A by 50 directly with the cell itself. Again, I thought I
saw
this done somewhere, which I obviously can't recall. I realize there are
work arounds, I just happen to have a situation where my preference would
be
not have to have insert another column to increase the value of cells in
an
existing column.

"ShaneDevenshire" wrote:

A formula changes the cell value in the same cell when it recalculates.

I think you are going to need to be more specific, why not give us an
example of what you mean.
--
Thanks,
Shane Devenshire


" wrote:

I recently saw a command (symbol) which allows you to change the value
of a
cell within the same cell. Opposed to inserting separate column with a
formula. Is anyone familiar with this or was I dreaming?




 
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
change background color of a cell with an "IF" command? Lee Excel Worksheet Functions 1 June 30th 07 07:41 PM
Cell Value is substituted for value in command [email protected] Excel Discussion (Misc queries) 6 February 8th 06 04:17 PM
Locate a cell, based on a criteria, then use the 'Cell' command... cdavidson Excel Discussion (Misc queries) 1 November 17th 05 06:30 PM
in vba what command is used to determine if a particular cell on a particular sheet changed? some kind of event? how to get the old and new value of the cell? Daniel Excel Worksheet Functions 1 June 23rd 05 07:53 PM
VBA Command to Look at cell in an If statement Wolf New Users to Excel 3 December 27th 04 11:27 PM


All times are GMT +1. The time now is 04:02 PM.

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"