A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Increasing easily the number in a cell.



 
 
Thread Tools Display Modes
  #1  
Old May 24th, 2008, 09:34 PM posted to microsoft.public.excel.newusers
DB.
external usenet poster
 
Posts: 28
Default Increasing easily the number in a cell.

I have a very large number (8 digits, perhaps) in a cell and wish to
increase marginally that number (add 2, say) without re-typing (almost)
the entire string of digits. Is there an easy way (maybe holding down a
simple key-combination then hitting "2") that will achieve my aim?

TIA of any reply.
--
DB.



  #3  
Old May 24th, 2008, 10:04 PM posted to microsoft.public.excel.newusers
Dave
external usenet poster
 
Posts: 2,331
Default Increasing easily the number in a cell.

Hi,
A simple macro will do this for you.
The following would be the simplest.

Sub Increment()
Range("A1").Value = Range("A1").Value + 1
End Sub

Assign a button or a short-cut key to the macro. Each time it runs, your
number will increase by 1.
I've assumed your number is in cell A1. Change the reference as necessary.

Regards - Dave.
  #4  
Old May 24th, 2008, 10:23 PM posted to microsoft.public.excel.newusers
DB.
external usenet poster
 
Posts: 28
Default Increasing easily the number in a cell.

Thanks for your quick reply, Don.
But holding down the f2 key and hitting "2" appends a 2 to the end
of the number (so that 15016283 becomes 150162832) whereas I want to
increase the number itself by 2 - i.e. for it to become 15016285.
Is there a simple way to do this, please? (And, similarly, a simple
way to subtract that 2 from my original number?).
Thanks again,
--
DB.



"Don Guillett" wrote in message
...
Try touching the f2 key

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DB." wrote in message
...
I have a very large number (8 digits, perhaps) in a cell and wish
to
increase marginally that number (add 2, say) without re-typing
(almost)
the entire string of digits. Is there an easy way (maybe holding
down a
simple key-combination then hitting "2") that will achieve my aim?

TIA of any reply.
--
DB.






  #5  
Old May 24th, 2008, 10:34 PM posted to microsoft.public.excel.newusers
Don Guillett
external usenet poster
 
Posts: 6,167
Default Increasing easily the number in a cell.

Right click sheet tabview codeinsert thischange f1 to your cell address.
Now when you right click on the cell the number will be increased by 2

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Intersect(Target, Range("f1")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target = Target + 2
Application.EnableEvents = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DB." wrote in message
news
Thanks for your quick reply, Don.
But holding down the f2 key and hitting "2" appends a 2 to the end of
the number (so that 15016283 becomes 150162832) whereas I want to increase
the number itself by 2 - i.e. for it to become 15016285.
Is there a simple way to do this, please? (And, similarly, a simple
way to subtract that 2 from my original number?).
Thanks again,
--
DB.



"Don Guillett" wrote in message
...
Try touching the f2 key

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DB." wrote in message
...
I have a very large number (8 digits, perhaps) in a cell and wish to
increase marginally that number (add 2, say) without re-typing (almost)
the entire string of digits. Is there an easy way (maybe holding down a
simple key-combination then hitting "2") that will achieve my aim?

TIA of any reply.
--
DB.







  #6  
Old May 24th, 2008, 10:56 PM posted to microsoft.public.excel.newusers
DB.
external usenet poster
 
Posts: 28
Default Increasing easily the number in a cell.

Thanks again, Don. But that solution is rather more complex than
I'd hoped for - this old dog is finding it increasingly difficult to
learn new tricks!
It's getting late here in UK - I must leave it until tomorrow to see
if I can fathom the meaning of your reply.

BW's,
(another) Don


"Don Guillett" wrote in message
...
Right click sheet tabview codeinsert thischange f1 to your cell
address. Now when you right click on the cell the number will be
increased by 2

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Intersect(Target, Range("f1")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target = Target + 2
Application.EnableEvents = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DB." wrote in message
news
Thanks for your quick reply, Don.
But holding down the f2 key and hitting "2" appends a 2 to the end
of the number (so that 15016283 becomes 150162832) whereas I want to
increase the number itself by 2 - i.e. for it to become 15016285.
Is there a simple way to do this, please? (And, similarly, a
simple way to subtract that 2 from my original number?).
Thanks again,
--
DB.



"Don Guillett" wrote in message
...
Try touching the f2 key

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DB." wrote in message
...
I have a very large number (8 digits, perhaps) in a cell and
wish to
increase marginally that number (add 2, say) without re-typing
(almost)
the entire string of digits. Is there an easy way (maybe holding
down a
simple key-combination then hitting "2") that will achieve my aim?

TIA of any reply.
--
DB.









  #7  
Old May 24th, 2008, 11:48 PM posted to microsoft.public.excel.newusers
Don Guillett
external usenet poster
 
Posts: 6,167
Default Increasing easily the number in a cell.

Not really too complicated to tap your finger twice......

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DB." wrote in message
...
Thanks again, Don. But that solution is rather more complex than I'd
hoped for - this old dog is finding it increasingly difficult to learn new
tricks!
It's getting late here in UK - I must leave it until tomorrow to see if
I can fathom the meaning of your reply.

BW's,
(another) Don


"Don Guillett" wrote in message
...
Right click sheet tabview codeinsert thischange f1 to your cell
address. Now when you right click on the cell the number will be
increased by 2

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Intersect(Target, Range("f1")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target = Target + 2
Application.EnableEvents = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DB." wrote in message
news
Thanks for your quick reply, Don.
But holding down the f2 key and hitting "2" appends a 2 to the end of
the number (so that 15016283 becomes 150162832) whereas I want to
increase the number itself by 2 - i.e. for it to become 15016285.
Is there a simple way to do this, please? (And, similarly, a simple
way to subtract that 2 from my original number?).
Thanks again,
--
DB.



"Don Guillett" wrote in message
...
Try touching the f2 key

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DB." wrote in message
...
I have a very large number (8 digits, perhaps) in a cell and wish
to
increase marginally that number (add 2, say) without re-typing
(almost)
the entire string of digits. Is there an easy way (maybe holding down
a
simple key-combination then hitting "2") that will achieve my aim?

TIA of any reply.
--
DB.










  #8  
Old May 25th, 2008, 12:04 AM posted to microsoft.public.excel.newusers
MartinW[_2_]
external usenet poster
 
Posts: 167
Default Increasing easily the number in a cell.

Hi DB,

It depends on your actual needs and exactly what sort of functionality
you require. Here are a couple of non macro ways of incrementing cells.

1) Put 2 in an empty cell and copy it.
Then right click on your target cell.
Select Paste Special.
Check Add
And OK out.
(This way works well if you have a lot of cells to add 2 to)

2) Go to ViewToolbarsForms.
On the Forms toolbar select a Spinner (small box with an Up arrow
and a Down arrow)
Left click and drag a box to set your spinner button.
Right click on the button and select format control.
In the dialag box set the incremental change you want
and set the cell link to a blank cell and OK out.
Click on the arrows a few times to see how it works.

Depending on your requirements, you can apply the spinner
directly to your target cell or you can put it in another cell
and reference it with a formula.
As an example if you were to
put =A2/10 in cell A1
put a spinner in A2
Succeessive clicks of the spinner will increase A1
in 0.1 increments
The spinner won't go negative so you have to adjust
the starting point to get that effect.

HTH
Martin

"DB." wrote in message
...
I have a very large number (8 digits, perhaps) in a cell and wish to
increase marginally that number (add 2, say) without re-typing (almost)
the entire string of digits. Is there an easy way (maybe holding down a
simple key-combination then hitting "2") that will achieve my aim?

TIA of any reply.
--
DB.





  #9  
Old May 25th, 2008, 01:46 PM posted to microsoft.public.excel.newusers
Brad
external usenet poster
 
Posts: 943
Default Increasing easily the number in a cell.

I recommend MartinW's first response....
--
Wag more, bark less


"DB." wrote:

I have a very large number (8 digits, perhaps) in a cell and wish to
increase marginally that number (add 2, say) without re-typing (almost)
the entire string of digits. Is there an easy way (maybe holding down a
simple key-combination then hitting "2") that will achieve my aim?

TIA of any reply.
--
DB.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:27 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.