View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Find a break in sequential number

You might be able to use automatic subtotals.....

Example:
With
A1:A100 containing a list of sequential values, including some breaks in the
sequences, with a column heading in A1 (assuming MyList)

Try this:
Insert a column before Col_A
(column A has moved one column to the right)
A1: GapFlag
A2: FALSE
A3: =IF((B3-B2)1,NOT(A2),A2)
copy A3 down as far as needed

Then, from the Excel main menu:
<data<subtotals
At each change in: GapFlag
Use function: Sum
Add subtotal to: MyList
Click the [OK] button

That will insert a row at each break in the numeric sequence and create a
subtotal for the sequential numbers.

In your situation, you could subtotal on whatever columns you like.

Is that something you can work with?

Post back with any questions.
***********
Regards,
Ron

XL2002, WinXP


"Cyberwolf" wrote:

I have a spreadsheet that gets populated from an Access database. Once it is
in Excel, I want to look at a column that contains sequential numbers. THere
will be breaks in these numbers. I want to be able to put a blank line
between these breaks and then total 2 current columns.

ANy insights would be appreciated.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf