×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to update a cell by one only!

How to update a cell by one only!

How to update a cell by one only!

(OP)
I would like to allow end users to update some information but only to update the information by adding one at a time.

Example

On Monday the output was

   A    B   C   D   E   F
1 t1   9
2 t2   7
3
4 ttl  16  
5

On Tuesday a User opens the file but it needs to add one to "1B".  I would like for the user to increase 9 to ten.

   A    B   C   D   E   F
1 t1   10
2 t2   7
3
4 ttl  17  
5

I would to prevent the user from deleting the entry or changing it to something else.  What I was thinking is to force the users to add it by one by clicking on a button or something similar to that.

Can you please provide any kind of comments or suggestions regarding this subject will be appreciate.

Thank you in advance for your help!

RE: How to update a cell by one only!

Use the macro recorder.  If you don't know how, then look it up in Excel Help.  Start the recorder.  In an empty cell of the worksheet type the number 1.  With cursor in the cell, hit the Copy button on the tool bar.  Select Cell B1.  Go to menu option Edit>Paste Special>Addition.  This will add the copied number to the value in cell B1. Go back to the cell that you typed 1 into and clear the contents.  Click again to select cell B1. After you do this, stop the recorder.  You now have the macro you need to assign to a button.

The easiest way to add a button is to activate the drawing tool bar then draw a text box.  For the text, enter the label you want for your button.  Now select the text box, right mouse click, and select Assign Macro...  Pick the name of the macro you just recorded.  Now when you hover over the text box the cursor will change and you can just click to run the macro.

Good luck

RE: How to update a cell by one only!

For this one you can use a command button with this code:

CODE

Cells(1, 2).Value = Cells(1, 2).Value + 1

You should also seriously look at my last post in Thread770-109611

Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting

UK steam enthusiasts: www.essexsteam.co.uk

RE: How to update a cell by one only!

(OP)
JohnWm - Thank you very much.  It is working fine!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources