View Single Post
  #14   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
Friendly Indián Friendly Indián is offline
external usenet poster
 
Posts: 3
Default Changing the contents of a cell... dynamically?

This is the reason. At my job I weigh containers (3 different
types), these containers contain packages. Now each contanier
has a different weight (tare), the weight I am interested in is
the actual package weight (the tares are 35, 210 and 466 lbs),
so when I enter a weight in, I want the tare weight to be
subtracted automatically from the cell. I have different
columns for each of the different containers, I then use the
data in a chart. So is there an easy (or pretty easy ) way to
do this? I can include a copy of my datasheet if that would
help to visualize. Thanks a lot!


"Harald Staff" wrote in message
...
25, 30, 20, etc ??? Please explain, this is like the rapid

french course "Horse is Cheval.
And so on."

And what's this for ? Why should someone have to enter 100 to

get 75 in a cell ?

Best wishes Harald
Followup to newsgroup only please.

"Friendly Indián" wrote in message
...
This works great, now what about this scenario. I have a

range
of cells, a10-a50 and I want to do this with all the cells,

i.e.
a10 - 25, a11 - 30, a12 - 20, etc. how can I do this

without a
1000 lines of code. can the cell ref. in code be changed
dynamically, and if so how? thanks.


"Harald Staff" wrote in message
...
Rightclick the sheet tab. Choose "view code". Paste this

in:

Private Sub Worksheet_Change(ByVal Target As Range)
With Target(1)
If .Address = "$A$10" Then
If IsNumeric(.Formula) Then
Application.EnableEvents = False
.Value = .Value - 25
Application.EnableEvents = True
End If
End If
End With
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please

"Friendly Indián" skrev i melding
...
I am wanting to do something that I don't know if it is
possible. Here is the scenario...

Say cell A10 gets data (numbers) entered into it, for

this
example lets say 100, after the focus moves from the

cell I
want
25 to be automatically subtracted from the number so

that it
is
actually is 75. How can I do this if it is possible?

Thanks.

--

Please reply to newsgroup so we can all learn from you
knowledge.
Private emails will not be answered.

Friendly Indián