• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Delete rows with numbers in sequence

Status
Not open for further replies.
p45cal

How to delete the entire line from the selection
 

Attachments

  • SPP Delete rows with numbers in sequence2.xlsm
    24 KB · Views: 2
Clarity needed:
Which?:
  • Delete the entire row across the entire sheet and move rows below up
  • Delete the entire row across the entire sheet and leave it blank
  • Delete only the numbers in columns D to I leaving them blank
  • Delete another set of columns (eg A to I) leaving them blank
  • Delete another set of columns (eg A to I) moving all cells below them in columns A to I up to close the gap.
In the cases you want to leave blank cells do you want to remove all formatting too from those blank cells?
 
Delete the entire row that is selected in the entire worksheet

Delete the row that is selected in the entire worksheet
 
Change
Code:
rngToDelete.Select
to one of:
Code:
rngToDelete.EntireRow.Clear
or:
Code:
rngToDelete.EntireRow.Delete
 
I have a similar case
I want to do exactly what this routine accomplishes except that I would like to delete:
4 numbers in a sequence
5 numbers in a sequence
6 numbers in a sequence

All other sequences and none-sequences remain.

Further explanation: I have rows of 6 numbers (Similar to Lotto sequence)
1,2,3,4,5,6 (Will be deleted because 5 (4 or more) numbers in sequence)
1,2,3,4,5,7 (Will be deleted because 5 numbers are in sequence)
1,2,3,4,6,8 (will be deleted because 4 numbers are in sequence)
1,2,3,8,14,20 (will not be deleted because only 3 numbers are in sequence)
3,8,9,16,20,22 (will not be deleted because no number in sequence)
1,2,4,15,16, 20 (will not be deleted because only 2 numbers are in sequence)

Please help
 
Status
Not open for further replies.
Back
Top