Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to update a cell by one only!

Status
Not open for further replies.

nangel

Automotive
Dec 7, 2004
10
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!
 
Replies continue below

Recommended for you

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
 
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:
 
JohnWm - Thank you very much. It is working fine!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor