LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Removing Sequential Numbers

On Jan 6, 10:22*am, Ron Rosenfeld wrote:
On Fri, 6 Jan 2012 05:22:31 -0800 (PST), JAgger1 wrote:
I've got 1000 data sets, I would like to remove the data sets that
have sequential numbers with in the set. Here's an example


A1: 1 2 5 7 9
A2: 1 3 5 7 9
A3: 1 3 4 5 8
A4: 3 4 6 7 9
A5: 2 4 6 8 0


How would I write a formula to remove any of the data sets (A1, A3,
A4) that have sequential numbers in it? Thanks


A formula cannot "remove a data set", it can only return a value. *To "remove a data set" you would have to use a VBA macro or one of the builtin filters. If you are going to use the Data/Filter, you MUST have a row of labels, so your data cannot start in Row 1 (I have adjusted my recommendation accordingly.

For a formula that can differentiate if there are sequential values in your five digit series, where a sequential number is defined by a following number being one more than the preceding:

This formula must be **array-entered**:

=OR((B2:E2-A2:D2)=1)

will return TRUE for sequential numbers, FALSE if not.

----------------------------------------

To **array-enter** a formula, after entering
the formula into the cell or formula bar, hold down
<ctrl<shift while hitting <enter. *If you did this
correctly, Excel will place braces {...} around the formula.

Then fill down as far as required.

You could then choose to use Data/Filter; filter on column F for the FALSE values.




Excellent! Thanks for the help everyone
 
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
Sequential Numbers LiAD Excel Discussion (Misc queries) 5 January 8th 09 03:39 PM
IF/THEN/ELSE for sequential numbers juggler Excel Programming 4 June 13th 07 04:52 AM
Sequential Numbers abcdexcel Excel Discussion (Misc queries) 3 January 18th 06 11:06 AM
sequential numbers Harley Excel Worksheet Functions 1 January 12th 06 09:57 PM
Sequential numbers BEEJAY Excel Programming 7 August 9th 05 07:14 PM


All times are GMT +1. The time now is 05:30 AM.

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"