Segregatting the data into different tabs based upon the names

Vimal_ku_mar

New Member
Joined
Jan 27, 2012
Messages
44
Hi,

Iam working on a file which distributes the data in different sheets of the same file.

I need the different sheets data to be saved as a different files with the tab names.

Can someone please help me with this.

Thanks,
Vimal
 

Some videos you may like

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

mrbeanyuk

Board Regular
Joined
Nov 30, 2005
Messages
212
Hi,

Iam working on a file which distributes the data in different sheets of the same file.

I need the different sheets data to be saved as a different files with the tab names.

Can someone please help me with this.

Thanks,
Vimal

How about this:

Sub CreateWorkbooks()
'Creates an individual workbook for each worksheet in the active workbook.
Dim wbDest As Workbook
Dim wbSource As Workbook
Dim sht As Object
Dim strSavePath As String

On Error GoTo ErrorHandler

Application.ScreenUpdating = False

strSavePath = "C:\Temp\" 'Change to your local directory
Set wbSource = ActiveWorkbook

For Each sht In wbSource.Sheets
sht.Copy
Set wbDest = ActiveWorkbook
wbDest.SaveAs strSavePath & sht.Name
wbDest.Close 'Remove this if you don't want each book closed after saving.
Next

Application.ScreenUpdating = True

Exit Sub

ErrorHandler: 'Just in case something hideous happens
MsgBox "An error has occurred. Error number=" & Err.Number & ". Error description=" & Err.Description & "."
End Sub
 

Vimal_ku_mar

New Member
Joined
Jan 27, 2012
Messages
44
i need the data to be segregated from one sheet to different sheets in the same workbook based upon the name field. this macro will create different files based upon the work sheets
 

Vimal_ku_mar

New Member
Joined
Jan 27, 2012
Messages
44

ADVERTISEMENT

Iam sorry but i don't see it.
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
47,926
Office Version
  1. 365
Platform
  1. Windows
Iam sorry but i don't see it.
Hover your mouse over the words 'this similar thread' at the end of my post and you will see it is a link which you can click to take you to the thread in question.
 

Vimal_ku_mar

New Member
Joined
Jan 27, 2012
Messages
44
Can someone please give me a macro which copies data from my main sheet to different tabs based upon name field.

Ima getting all complicated macro's which is making my file go haywire.

can someone please help me with a simple macro
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
47,926
Office Version
  1. 365
Platform
  1. Windows
... making my file go haywire.
That's a pretty vague description which gives us nothing to move forward with.

The macro I provided in post #5 of the thread I linked to is not that complicated - at least it isn't very long. It has a few assumptions listed above it and it has two lines in it that are clearly marked as needing modification.

1. Are the 4 assumptions I listed applicable to your situation (at least numbers 3 & 4 as 1 and 2 are dealt with in the code)? If not, please give details.

2. Did you modify the 2 lines near the top to match your sheet name and column number and then try the code? If so, and it did not produce the correct results for you, please explain in what way it did not.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,554
Messages
5,596,814
Members
414,104
Latest member
imamalidadashzada

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top