Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Incrementing numbers

On Sep 7, 4:10 pm, Mike H wrote:
or the highlighting use

Sub test_increments()
For Each cell In Range(Range("A1").Offset(1, 0),
Range("A65536").End(xlUp))
If cell.Value < cell.Offset(-1, 0).Value + 1 Then
cell.Interior.ColorIndex = 3
End If
Next cell
End Sub

Mike



" wrote:
On Sep 7, 11:41 am, "Jayson Wiser"
wrote:
Sub test_increments()
For each cell in
range(range("A1").offset(1,0),range("A65536").end( xlup))
if cell.value < cell.offset(-1,0).value + 1 then
'highlight cell
end if
next cell
end sub


wrote in message


ups.com...


Hello,


Can someone please provide some code that will look at each cell in a
column to ascertain if the number in each cell is incrementing by 1. I
would also like it to highlite the first cell in every non
incrementing sequence. Hope this is clear ;-)


Chalky- Hide quoted text -


- Show quoted text -


Thanks for the checking code. Anybody able to assist with the
highlighting bit?- Hide quoted text -


- Show quoted text -


Thanks, this suits my needs exactly

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
Incrementing numbers in cells Andrew Morine Excel Worksheet Functions 1 August 26th 08 02:11 AM
Incrementing Cell Numbers den1s Excel Programming 2 April 3rd 06 03:55 AM
incrementing account numbers John Excel Discussion (Misc queries) 5 March 10th 06 02:44 PM
Incrementing numbers Floyd107 Excel Worksheet Functions 2 February 28th 06 10:04 AM
Incrementing Cell Numbers Lance W. Grimes Excel Discussion (Misc queries) 1 March 8th 05 07:51 PM


All times are GMT +1. The time now is 05:20 PM.

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

About Us

"It's about Microsoft Excel"