ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Command to change the value of a cell within same cell (https://www.excelbanter.com/excel-worksheet-functions/165462-command-change-value-cell-within-same-cell.html)

[email protected]

Command to change the value of a cell within same cell
 
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?

ShaneDevenshire

Command to change the value of a cell within same cell
 
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?


[email protected]

Command to change the value of a cell within same cell
 
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?


Herbert Seidenberg

Command to change the value of a cell within same cell
 
Assuming your data looks like this:
$78.70 Ship
$51.34 6.5
$71.64 6.5
$14.50
$49.82
$93.55
and you want to add $6.50 shipping cost to all the values in column A
and you want to automatically update when shipping cost changes.
Enter the shipping cost into B2.
Enter this formula into B3:
=$B$2 or
=Ship
Select B3 Copy
Select the values in A Paste Special Paste: Formulas/Operation:
Add
The formula in A1 will now say:
=78.7+(Ship)
and column A will show this:
$85.20
$57.84
$78.14
$21.00
$56.32
$100.05
If you change B2, the values in A will be updated.


Don Guillett

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?




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

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