Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
JC
 
Posts: n/a
Default Workbook to different worksheets

Hi..

I have 1 workbook with data pertaining to different managers.. Want to
make different worksheets for different planners.. Please help..

Thanks
JC

  #2   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Workbook to different worksheets

"JC" wrote:
.. I have 1 workbook with data pertaining to different managers
Want to make different worksheets for different planners..


Perhaps one way ..

Try this previous response to a similar query:
http://tinyurl.com/kwsgw

A new link to the sample construct therein is at:
http://cjoint.com/?cwlqnxXxgn
AutoSortData_BySheetName.xls

(previous link to sample expired)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


  #3   Report Post  
Posted to microsoft.public.excel.misc
NAVEEN
 
Posts: n/a
Default Workbook to different worksheets

Hi JC,

Problem statement is not so clear. But you can use one of the following ways
to seperate related data

1. Pivot tables
2. Autofilter

on DATA menu.

Regards
NAVEEN

"JC" wrote:

Hi..

I have 1 workbook with data pertaining to different managers.. Want to
make different worksheets for different planners.. Please help..

Thanks
JC


  #4   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin
 
Posts: n/a
Default Workbook to different worksheets

Hi JC

Try this
http://www.rondebruin.nl/copy5.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"JC" wrote in message oups.com...
Hi..

I have 1 workbook with data pertaining to different managers.. Want to
make different worksheets for different planners.. Please help..

Thanks
JC



  #5   Report Post  
Posted to microsoft.public.excel.misc
Dsuperc
 
Posts: n/a
Default Workbook to different worksheets

Try this
Sub FanOut()
Dim ColHead As String
Dim ColHeadCell As Range
Dim iCol As Integer
Dim iRow As Long 'row index on Fan Data sheet
Dim lRow As Integer 'row index on individual destination sheet
Dim NewWB As Workbook
Dim Dsheet As Worksheet 'destination worksheet
Dim Fsheet As Worksheet 'fan data worksheet (assumed active)

Again:
ColHead = InputBox("Enter Column Heading", "Identify Column", [H1].Value)
If ColHead = "" Then Exit Sub
Set ColHeadCell = Rows(1).Find(ColHead, lookat:=xlWhole)
If ColHeadCell Is Nothing Then
MsgBox "Heading not found in row 1"
GoTo Again
End If

Set Fsheet = ActiveSheet
Set NewWB = Workbooks.Add

iCol = ColHeadCell.Column
'loop through values in selected column
For iRow = 2 To Fsheet.Cells(65536, iCol).End(xlUp).Row
If Not SheetExists(CStr(Fsheet.Cells(iRow, iCol).Value)) Then
Set Dsheet =
NewWB.Worksheets.Add(after:=NewWB.Worksheets(NewWB .Worksheets.Count))
Dsheet.Name = CStr(Fsheet.Cells(iRow, iCol).Value)
Else
Set Dsheet = Worksheets(CStr(Fsheet.Cells(iRow, iCol).Value))
End If
lRow = Dsheet.Cells(65536, iCol).End(xlUp).Row
Fsheet.Rows(iRow).Copy Destination:=Dsheet.Rows(lRow + 1)
Next iRow

End Sub

Function SheetExists(SheetId As Variant) As Boolean

' This function checks whether a sheet (can be a worksheet,
' chart sheet, dialog sheet, etc.) exists, and returns
' True if it exists, False otherwise. SheetId can be either
' a sheet name string or an integer number. For example:

' If SheetExists(3) Then Sheets(3).Delete

' deletes the third worksheet in the workbook, if it exists.
' Similarly,

' If SheetExists("Annual Budget") Then Sheets("Annual Budget").Delete

' deletes the sheet named "Annual Budget", if it exists.

Dim Sh As Object
On Error GoTo NoSuch
Set Sh = Sheets(SheetId)
SheetExists = True
Exit Function
NoSuch:
If Err = 9 Then SheetExists = False Else Stop

End Function


"JC" wrote:

Hi..

I have 1 workbook with data pertaining to different managers.. Want to
make different worksheets for different planners.. Please help..

Thanks
JC


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
Protecting all worksheets of a workbook neeraj Excel Discussion (Misc queries) 14 May 30th 06 09:46 PM
How do I build a workbook from the worksheets another workbook? Rico Excel Discussion (Misc queries) 4 August 19th 05 02:04 PM
Worksheets in a workbook? Bob .-.-. New Users to Excel 4 June 23rd 05 10:30 PM
Sorting data in a workbook across multple worksheets Phil Excel Worksheet Functions 7 June 22nd 05 08:49 PM
how do i link a list of items in a workbook to worksheets in the . Camalla Excel Discussion (Misc queries) 2 April 22nd 05 09:35 PM


All times are GMT +1. The time now is 04:55 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"