Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-07-2014, 11:08 AM
mvtpinheiro mvtpinheiro is offline Remove number sequences Mac OS X Remove number sequences Office for Mac 2011
Novice
Remove number sequences
 
Join Date: May 2014
Posts: 2
mvtpinheiro is on a distinguished road
Default Remove number sequences


Hello,

I have a spreadsheet with multiple tabs that lists (via Macro) all possible combinations for 15 numbers out of 25 numbers (3 million+ results - 230Mb xls), where each number is on cell.
Now I want to clean up this list removing all the combinations that have more than 6 numbers in sequence (actually replace the cells with blank).

For example:

1, 2, 3, 4, 5, 6, 7, 10, 14, 15, 17, 22, 23, 24, 25 - since we have 7 numbers in sequence (1 to 7), I would like to replace all 15 cells in this row with blanks.

Also, I would like to remove some patterns, for example:

1, 3, 5, 7, 9, 11, 13, 15, 17, 18, 19, 21, 23, 24, 25 - since we have 1 to 17 skipping one number (than I would select the patterns I don't want and replace all 15 cells with blanks too).

Any ideas??

Tks, Marcus
Reply With Quote
  #2  
Old 05-07-2014, 08:08 PM
gebobs gebobs is offline Remove number sequences Windows 7 64bit Remove number sequences Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

Could be done with a little legwork with equations. Code might be better. Question: are the numbers in a row always in sequential order? i.e.

1, 2, 3, 4, 5, ...
but not
1, 5, 3, 2, 4, ...

If so,

=if(or(and(a2=a1+1,a3=a2+1,a4=a3+1,a5=a4+1,a6=a5+1 ,a7=a6+1),(same thing comparing cells a2-a8),(so on and so forth),(same thing comparing a19-a25),"x","").

Then all you have to do is sort by those results and clear any rows that has an "x" for this result. I'm not sure if Excel limits on formula size will be a problem. I see a limit of 1024 characters per cell so if that applies to formulas, you should be ok. ***

Anyhoo, same sort of thing with your other rules. If the above equation works, you should be able to figure it out from here. If not, let me know.




*** I think some equations have some quirky limits to like a Sum equation can't have more than 30 commas). You should be ok. I actually just tested that and it seems like that is no longer an issue.
Reply With Quote
  #3  
Old 05-08-2014, 08:03 AM
mvtpinheiro mvtpinheiro is offline Remove number sequences Mac OS X Remove number sequences Office for Mac 2011
Novice
Remove number sequences
 
Join Date: May 2014
Posts: 2
mvtpinheiro is on a distinguished road
Default

All the numbers are in ascending order. I'm guessing the best approach here will be through coding, because than I would only need to run the script to clean up the xls.

As I mentioned before, it's a 230Mb xls with 5 tabs and 3 million+ combinations
Reply With Quote
  #4  
Old 05-09-2014, 07:12 PM
BobBridges's Avatar
BobBridges BobBridges is offline Remove number sequences Windows 7 64bit Remove number sequences Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Yeah, but it's the same amount of work to write the VBA code to run through millions of rows as twelve. Just takes longer to run afterward. And there are things you can do to keep even that from getting too unwieldy—or at least to reduce the run time considerably, but 3 million rows may take a while no matter how cleverly you code.

So your data is in 3 million rows by 15 cells, right? Do you know how you want to proceed, then, or are you still looking for ideas?
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
animate long image sequences validusername PowerPoint 0 12-24-2013 07:10 PM
Sequential Numbering on Tickets Multiple number Sequences skitchen Word 2 10-01-2013 06:41 AM
Remove number sequences Need an excel formula to remove dashes in a number sequence jyfuller Excel Programming 3 02-27-2013 10:32 PM
number remove, data get gsrikanth Excel 5 02-23-2012 05:42 AM
Looping custom animation sequences or a selection of slides regilala PowerPoint 0 02-07-2010 07:35 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft