Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Workshops
 
Posts: n/a
Default increment a value by 1

How do I increment, automatically, a cell by 1 if a condition is met? If one
of my cells reaches 10k I want another cell to increment by 1. Can anyone
help me if this function can be done?
Thank you, Ron
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Gary''s Student
 
Posts: n/a
Default increment a value by 1

Do you want the increment only when it changes from below 10K to above 10K,
or anytime is is above 10K?
--
Gary's Student


"Workshops" wrote:

How do I increment, automatically, a cell by 1 if a condition is met? If one
of my cells reaches 10k I want another cell to increment by 1. Can anyone
help me if this function can be done?
Thank you, Ron

  #3   Report Post  
Posted to microsoft.public.excel.newusers
Workshops
 
Posts: n/a
Default increment a value by 1

Increment by 1 if the total equals 10,000, not more, not less, but equal to
10,000. The nature of the beast is that the typist would only enter a value
that is greater than 9,999 but never over 10k. I hope this is what you need...

"Gary''s Student" wrote:

Do you want the increment only when it changes from below 10K to above 10K,
or anytime is is above 10K?
--
Gary's Student


"Workshops" wrote:

How do I increment, automatically, a cell by 1 if a condition is met? If one
of my cells reaches 10k I want another cell to increment by 1. Can anyone
help me if this function can be done?
Thank you, Ron

  #4   Report Post  
Posted to microsoft.public.excel.newusers
Gary''s Student
 
Posts: n/a
Default increment a value by 1

First enter this in worksheet code:

Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Range("A1:A1"), Target) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Cells(1, 1).Value = 10000 Then
Cells(1, 2).Value = Cells(1, 2).Value + 1
End If
Application.EnableEvents = True
End Sub

This is only a sample. Everytime the worksheet changes, this routine wakes
up briefly. It checks to see if cell A1 has been updated. If no, it goes
back to sleep.

If cell A1 has been updatedn it increments cell A2. You can modify the code
to use other cells.


Just remember that the macro goes in worksheet code, and not a module.

--

Gary's Student


"Workshops" wrote:

Increment by 1 if the total equals 10,000, not more, not less, but equal to
10,000. The nature of the beast is that the typist would only enter a value
that is greater than 9,999 but never over 10k. I hope this is what you need...

"Gary''s Student" wrote:

Do you want the increment only when it changes from below 10K to above 10K,
or anytime is is above 10K?
--
Gary's Student


"Workshops" wrote:

How do I increment, automatically, a cell by 1 if a condition is met? If one
of my cells reaches 10k I want another cell to increment by 1. Can anyone
help me if this function can be done?
Thank you, Ron

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
check cell val, increment val DJS Excel Worksheet Functions 0 January 30th 06 10:29 PM
need to increment value Tom Excel Discussion (Misc queries) 5 June 24th 05 12:54 PM
Relative reference autofill increment other than +1 SteveB Excel Discussion (Misc queries) 3 June 14th 05 07:40 PM
How do I automatically increment worksheet number when pasting a . Mr Keldor Excel Worksheet Functions 1 April 21st 05 06:06 PM
How do I increment a fill series by a number other than 1? Say I. John Excel Worksheet Functions 3 January 6th 05 09:34 PM


All times are GMT +1. The time now is 12:21 PM.

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

About Us

"It's about Microsoft Excel"