Excel 2003 ... is there a way

lacogada

Board Regular
Joined
Jan 26, 2011
Messages
170
Using excel 2003.

Is there a way to "press the Enter key and 1 is added to current cell".

Say I hit Enter seven times ... the number 7 shows in current cell.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Is it not quicker and less keystrokes to just type 7 in a cell or 20 as 20 hits would be a bit tedious

What is your reasoning behind your request
 
Upvote 0
Is it not quicker and less keystrokes to just type 7 in a cell or 20 as 20 hits would be a bit tedious

What is your reasoning behind your request

Helps me to scan a plan and easily keep track of items.
I normally did this with an adding machine.

Work space area changed and cannot have both laptop and adding machine ... need laptop more,
so was hoping to find a way to resemble the adding machine function with excel.
 
Upvote 0
I could write you a macro script using double click.
You double click the cell and it would add up things.

But not sure if this feature works on Excel 2003.
That's nearly 15 years old.

When you double click on any cell the value will increase by one.





Here try this:

This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab
Select View Code from the pop-up context menu
Paste the code in the VBA edit window
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Modified  12/17/2018  6:01:10 PM  EST
On Error GoTo M
Cancel = True
Target.Value = Target.Value + 1
Exit Sub
M:
MsgBox "You did not double click on a numeric value"

End Sub
 
Upvote 0
MAIT ... Thanks a bunch for writing the code ... I'm thinking way to much clicking though.


Could code be written for something like :


Open workbook and cell A1 is active.
Hit down arrow and 1 is placed in A1.
Hit down arrow and 1 is placed in A2.
etc


Thanks
 
Upvote 0
One way to achieve the same result can be to insert an ActiveX button.

Place this code in the button:
Code:
Range("A1").Value = Range("A1").Value + 1

When the button is clicked once by the mouse it will stay active and you can hit the button again and again by hitting the space bar.
 
Upvote 0
Your moving the Goal post:

This is not what you asked for in your original post.

You asked for:

Is there a way to "press the Enter key and 1 is added to current cell".

My script does that using double click.

pressing down arrow to activate a script is not something I know how to do.

Are you saying when you enter cell you want this to happen?

Please explain again what you want.

Are you saying any time to enter a cell in column A you want a 1 entered into that cell?
 
Upvote 0
Try this:

Any time you select any cell in column A a 1 will be entered


Install code as mentioned in previous post:

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Modified  12/17/2018  6:54:10 PM  EST
If Not Intersect(Target, Range("A:A")) Is Nothing Then
If Target.Cells.CountLarge > 1 Then Exit Sub
Target.Value = "1"
End If
End Sub
 
Upvote 0
Your moving the Goal post:

This is not what you asked for in your original post.

You asked for:

Is there a way to "press the Enter key and 1 is added to current cell".

My script does that using double click.


Sorry, not intentional .... was just looking for something easier than double click.​
 
Upvote 0
Try this:

Any time you select any cell in column A a 1 will be entered


Install code as mentioned in previous post:

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Modified  12/17/2018  6:54:10 PM  EST
If Not Intersect(Target, Range("A:A")) Is Nothing Then
If Target.Cells.CountLarge > 1 Then Exit Sub
Target.Value = "1"
End If
End Sub

Tried but get error :

codeerror.jpg
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,535
Messages
6,114,198
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top