Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
TGV TGV is offline
external usenet poster
 
Posts: 63
Default Macro Code Required - Pls Help

I am having some data in A COLUMN and the data is available in 5000 cells (A
COLUMN CELLS). Now I want a macro that should take the first 200 CELLS data
which is available in A COLUMN to a NEW WORK SHEET. The next 200 should be
created in another WORK SHEET like this all the 5000 data in A COLUMN should
be created as a NEW WORKSHEET as 200 each in all NEW WORK SHEETS.

At the same time I would like to inform you that the data in A COLUMN cells
will not be a stable one and it will vary like 2000 Or 3000 like this. At
the same time I assure you that there will not be any blank cells in between
that 2000 or 3000 or 5000 cells. So please create a macro that should itself
select the range from starting to ending of the A COLUMN data and it should
split the cells as 200 each in every NEW WORK SHEET.

Finally in every end of the NEW SHEET that is in cell no 201 the macro
should a show the Value as €śabove data is for 200 cells€ť.

I hope I have explained it correctly and thanks in advance.

Please give a macro for this because I need it urgently.

Thank you,

TGV

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Macro Code Required - Pls Help

Hi,

Alt+F11 to open VB editor. Right click 'ThisWorkbook'and insert module and
paste this in and run it. It assumes the source data are in Sheet1

Sub sonic()
lastrow = Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lastrow Step 200
ActiveWorkbook.Worksheets.Add After:=Sheets("Sheet1")

Sheets("Sheet1").Rows(i & ":" & WorksheetFunction.Min(i + 199, lastrow)).Copy
ActiveSheet.PasteSpecial

Next
End Sub

Mike

"TGV" wrote:

I am having some data in A COLUMN and the data is available in 5000 cells (A
COLUMN CELLS). Now I want a macro that should take the first 200 CELLS data
which is available in A COLUMN to a NEW WORK SHEET. The next 200 should be
created in another WORK SHEET like this all the 5000 data in A COLUMN should
be created as a NEW WORKSHEET as 200 each in all NEW WORK SHEETS.

At the same time I would like to inform you that the data in A COLUMN cells
will not be a stable one and it will vary like 2000 Or 3000 like this. At
the same time I assure you that there will not be any blank cells in between
that 2000 or 3000 or 5000 cells. So please create a macro that should itself
select the range from starting to ending of the A COLUMN data and it should
split the cells as 200 each in every NEW WORK SHEET.

Finally in every end of the NEW SHEET that is in cell no 201 the macro
should a show the Value as €śabove data is for 200 cells€ť.

I hope I have explained it correctly and thanks in advance.

Please give a macro for this because I need it urgently.

Thank you,

TGV

  #3   Report Post  
Posted to microsoft.public.excel.misc
TGV TGV is offline
external usenet poster
 
Posts: 63
Default Macro Code Required - Pls Help

Thank you very much mike! It's working fine.....

"Mike H" wrote:

Hi,

Alt+F11 to open VB editor. Right click 'ThisWorkbook'and insert module and
paste this in and run it. It assumes the source data are in Sheet1

Sub sonic()
lastrow = Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lastrow Step 200
ActiveWorkbook.Worksheets.Add After:=Sheets("Sheet1")

Sheets("Sheet1").Rows(i & ":" & WorksheetFunction.Min(i + 199, lastrow)).Copy
ActiveSheet.PasteSpecial

Next
End Sub

Mike

"TGV" wrote:

I am having some data in A COLUMN and the data is available in 5000 cells (A
COLUMN CELLS). Now I want a macro that should take the first 200 CELLS data
which is available in A COLUMN to a NEW WORK SHEET. The next 200 should be
created in another WORK SHEET like this all the 5000 data in A COLUMN should
be created as a NEW WORKSHEET as 200 each in all NEW WORK SHEETS.

At the same time I would like to inform you that the data in A COLUMN cells
will not be a stable one and it will vary like 2000 Or 3000 like this. At
the same time I assure you that there will not be any blank cells in between
that 2000 or 3000 or 5000 cells. So please create a macro that should itself
select the range from starting to ending of the A COLUMN data and it should
split the cells as 200 each in every NEW WORK SHEET.

Finally in every end of the NEW SHEET that is in cell no 201 the macro
should a show the Value as €śabove data is for 200 cells€ť.

I hope I have explained it correctly and thanks in advance.

Please give a macro for this because I need it urgently.

Thank you,

TGV

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
macro code required muddan madhu Excel Worksheet Functions 2 April 28th 08 03:43 PM
Macro Code required muddan madhu Excel Discussion (Misc queries) 1 April 26th 08 02:21 PM
help required in completing the code deepika :excel help[_2_] Excel Discussion (Misc queries) 0 February 26th 08 09:15 AM
Code required for VLookup returning #NA Marie Bayes Excel Discussion (Misc queries) 7 January 10th 07 04:01 PM
Macro required PCOR Excel Worksheet Functions 3 December 11th 05 07:36 PM


All times are GMT +1. The time now is 07:52 PM.

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"