View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JohnUK JohnUK is offline
external usenet poster
 
Posts: 173
Default Sequence of numbers

Hi,
I am looking for a way (through VBA) to enter a sequence of numbers against
a column of dates. For example:
If column A had 10 cells with the same date, I then want column B to
populate with numbers from 1 to 10.
If the next line had a single date, column B to show as a 1
(The dates will always be in order by the way)
If then there was a gap in column A to return a blank in column B.
To show you what I mean in a little more detail:

Date column Sequence column

Mon 17 Jul 1
Mon 17 Jul 2
Mon 17 Jul 3
Tue 18 Jul 1
Wed 19 Jul 1
Thu 20 Jul 1
Thu 20 Jul 2
Thu 20 Jul 3
Thu 20 Jul 4
Fri 21 Jul 1
Sat 22 Jul 1

Mon 24 Jul 1
Mon 24 Jul 2

I hope I explained that well enough.
Many thanks for your help
John