I been trying to write a macro to split a worksheet based on column C to multiple worksheets inn the same workbook. if any one can help i really would apperciate it.
I been trying to write a macro to split a worksheet based on column C to multiple worksheets inn the same workbook. if any one can help i really would apperciate it.
Last edited by daillest319; 06-13-2012 at 10:11 AM.
Try this - assumes headers in row 1
![]()
Please Login or Register to view this content.
works great with headers but is it possbile to do this if i dont have headers?
Last edited by daillest319; 06-13-2012 at 09:21 AM.
Try this
![]()
Please Login or Register to view this content.
works perfect thank you...but is there anyway i can have the worksheets named to what there being split...for example equal what column C cell is...like the first code did?
Yes, try
![]()
Please Login or Register to view this content.
thank you so much....works perfect
I do have a question about this macro. I tested it for my purposes but it seems to keep adding the same worksheet with a new Worksheet name incremented by one even if it already exists from a previous macro run. Is there a way to only add another worksheet if that one does not already exists in the event more data is added to the Master worksheet? So each time it is run it would then clear and replace data that may already be in an existing one and update it with what is currently there?
Are there just the Master worksheet and the "child" worksheets created by the macro? Which version are you using - with or without headers?
Yes I have a Master worksheet and child worksheets with headers and I am using Excel 2010. The child worksheets were created from the first initial run of this macro.
Try this
![]()
Please Login or Register to view this content.
There is a typo with the worhsheets.Name but it still is not an accepted function. I see what you are trying to do but now I am trying to see where and how that logic will fit in the existing code.
I wonder if I can try an approach looking for the WksExists(being the value of column 1). If it exists then clear the cells and replace with new data ELSE add a new sheet.
This piece seems to be working in place of the delete part you have:
![]()
Please Login or Register to view this content.
Apologies
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks