Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Split data into multiple worksheets by row count

Hi,

I have a very large data list which I need to run some formula on,
however because the data has over 200,000 rows when the formula is ran
the processor grinds to a halt.

Is there any way using vba that the rows can be split into worksheets
for say every 10,000 rows of data?

Any help is greatly appreciated.

Thanks
Stuart
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Split data into multiple worksheets by row count

Stuart

Try this, change srchsheet to the sheet with your data and rnglen to the
size of block to copy (Iused 24 rows. Note also the ofset statement (curently
25) resize this to how many columns you want to copy

Sub Lime()
Dim srcSheet As String
Dim RngLen As Long
RngLen = 25 'Change to suit
srcSheet = "Sheet1" 'Change to suit
For x = 1 To 100 Step RngLen
Sheets(srcSheet).Range("A" & x & ":A" & x + RngLen - 1).Resize(, 25).Copy
Worksheets.Add After:=Worksheets(srcSheet)
ActiveSheet.Range("A1").PasteSpecial
Next
End Sub

Mike


"Stuart" wrote:

Hi,

I have a very large data list which I need to run some formula on,
however because the data has over 200,000 rows when the formula is ran
the processor grinds to a halt.

Is there any way using vba that the rows can be split into worksheets
for say every 10,000 rows of data?

Any help is greatly appreciated.

Thanks
Stuart

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Split data into multiple worksheets by row count

Here are some suggestions for large databases

1) Use Access rather then excel. Access is designed tohandle very large
amounts of data than excel
2) Use CSV files rather than XLS if you don't need the formating.
3) Rather than put formulas in the worksheet use evaluate

results = evaluate("Sum(A1:A200000)")


"Stuart" wrote:

Hi,

I have a very large data list which I need to run some formula on,
however because the data has over 200,000 rows when the formula is ran
the processor grinds to a halt.

Is there any way using vba that the rows can be split into worksheets
for say every 10,000 rows of data?

Any help is greatly appreciated.

Thanks
Stuart

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Split data into multiple worksheets by row count

Thanks Mike H - your suggestion works perfectly.

Reply
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
Split worksheet into multiple worksheets Marica Excel Programming 10 July 7th 09 12:12 PM
Split a worksheet into multiple worksheets of the same Excel file shree Excel Programming 1 November 4th 08 08:24 PM
How to split up one spreadsheet into multiple worksheets Gloria Lewis Excel Discussion (Misc queries) 1 March 3rd 08 05:18 PM
split results to multiple worksheets Rich Excel Worksheet Functions 3 April 11th 05 07:51 PM
Data from One Worksheet split into Multiple Worksheets DougJoe Excel Programming 2 January 19th 04 08:06 PM


All times are GMT +1. The time now is 08:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"