Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default I want to Split & save the data in different workbook

Can anyone please help me in this regards...

I want to split the data in diiferent workbook and save it in new
folder.( every time i split the data the macro should create new
folder for it)

I have data which contains credit and debit details of the clients, i
want to split that data from customer code and save it in foleder with
file name (which contains client code in it )

Please provide me the required VBL query......trying hard for many
days but still not succeded.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default I want to Split & save the data in different workbook

Hi Amol

Try the workbook example
http://www.rondebruin.nl/copy5.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Amol" wrote in message ups.com...
Can anyone please help me in this regards...

I want to split the data in diiferent workbook and save it in new
folder.( every time i split the data the macro should create new
folder for it)

I have data which contains credit and debit details of the clients, i
want to split that data from customer code and save it in foleder with
file name (which contains client code in it )

Please provide me the required VBL query......trying hard for many
days but still not succeded.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default I want to Split & save the data in different workbook

On Jul 20, 10:57 pm, "Ron de Bruin" wrote:
Hi Amol

Try the workbook examplehttp://www.rondebruin.nl/copy5.htm

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"Amol" wrote in oglegroups.com...
Can anyone please help me in this regards...


I want to split the data in diiferent workbook and save it in new
folder.( every time i split the data the macro should create new
folder for it)


I have data which contains credit and debit details of the clients, i
want to split that data from customer code and save it in foleder with
file name (which contains client code in it )


Please provide me the required VBL query......trying hard for many
days but still not succeded.- Hide quoted text -


- Show quoted text -


Its not working....

i have no idea where the file got saved Plus there is one sheet added
in existing data sheet....

No folder name, no file saved with customer name......

Result = Total confussion

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default I want to Split & save the data in different workbook

You must use
http://www.rondebruin.nl/copy5.htm#4)

What have you changed in my example



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Amol" wrote in message oups.com...
On Jul 20, 10:57 pm, "Ron de Bruin" wrote:
Hi Amol

Try the workbook examplehttp://www.rondebruin.nl/copy5.htm

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"Amol" wrote in oglegroups.com...
Can anyone please help me in this regards...


I want to split the data in diiferent workbook and save it in new
folder.( every time i split the data the macro should create new
folder for it)


I have data which contains credit and debit details of the clients, i
want to split that data from customer code and save it in foleder with
file name (which contains client code in it )


Please provide me the required VBL query......trying hard for many
days but still not succeded.- Hide quoted text -


- Show quoted text -


Its not working....

i have no idea where the file got saved Plus there is one sheet added
in existing data sheet....

No folder name, no file saved with customer name......

Result = Total confussion

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default I want to Split & save the data in different workbook

On Jul 20, 11:16 pm, "Ron de Bruin" wrote:
You must usehttp://www.rondebruin.nl/copy5.htm#4)

What have you changed in my example

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"Amol" wrote in ooglegroups.com...
On Jul 20, 10:57 pm, "Ron de Bruin" wrote:
Hi Amol


Try the workbook examplehttp://www.rondebruin.nl/copy5.htm


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"Amol" wrote in oglegroups.com...
Can anyone please help me in this regards...


I want to split the data in diiferent workbook and save it in new
folder.( every time i split the data the macro should create new
folder for it)


I have data which contains credit and debit details of the clients, i
want to split that data from customer code and save it in foleder with
file name (which contains client code in it )


Please provide me the required VBL query......trying hard for many
days but still not succeded.- Hide quoted text -


- Show quoted text -


Its not working....


i have no idea where the file got saved Plus there is one sheet added
in existing data sheet....


No folder name, no file saved with customer name......


Result = Total confussion- Hide quoted text -


- Show quoted text -


on which location the folder got saved??? Its just a run macro and add
one sheet with no date just a hearder.....
I think i am not able to explain what i want.........if provide the
exact query for same and not a link



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default I want to Split & save the data in different workbook

Please read the information on the site and use the correct example

Check if the information in these lines is correct before you run the macro.

Name of the worksheet with your data table
Set ws1 = Sheets("Sheet1") '<<< Change

Data range: A1 is the top left cell of your filter range and the header of the first column,
and D is the last column in the filter range.
Set rng = ws1.Range("A1:D" & Rows.Count)

You can change the filter column to another column, my range starts in A so the 1
in my example is the A column(2 = B, 3 =C,...............)
rng.Columns(1).AdvancedFilter _



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Amol" wrote in message ups.com...
On Jul 20, 11:16 pm, "Ron de Bruin" wrote:
You must usehttp://www.rondebruin.nl/copy5.htm#4)

What have you changed in my example

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"Amol" wrote in ooglegroups.com...
On Jul 20, 10:57 pm, "Ron de Bruin" wrote:
Hi Amol


Try the workbook examplehttp://www.rondebruin.nl/copy5.htm


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"Amol" wrote in oglegroups.com...
Can anyone please help me in this regards...


I want to split the data in diiferent workbook and save it in new
folder.( every time i split the data the macro should create new
folder for it)


I have data which contains credit and debit details of the clients, i
want to split that data from customer code and save it in foleder with
file name (which contains client code in it )


Please provide me the required VBL query......trying hard for many
days but still not succeded.- Hide quoted text -


- Show quoted text -


Its not working....


i have no idea where the file got saved Plus there is one sheet added
in existing data sheet....


No folder name, no file saved with customer name......


Result = Total confussion- Hide quoted text -


- Show quoted text -


on which location the folder got saved??? Its just a run macro and add
one sheet with no date just a hearder.....
I think i am not able to explain what i want.........if provide the
exact query for same and not a link

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default I want to Split & save the data in different workbook

On Jul 20, 11:16 pm, "Ron de Bruin" wrote:
You must usehttp://www.rondebruin.nl/copy5.htm#4)

What have you changed in my example

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"Amol" wrote in ooglegroups.com...
On Jul 20, 10:57 pm, "Ron de Bruin" wrote:
Hi Amol


Try the workbook examplehttp://www.rondebruin.nl/copy5.htm


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"Amol" wrote in oglegroups.com...
Can anyone please help me in this regards...


I want to split the data in diiferent workbook and save it in new
folder.( every time i split the data the macro should create new
folder for it)


I have data which contains credit and debit details of the clients, i
want to split that data from customer code and save it in foleder with
file name (which contains client code in it )


Please provide me the required VBL query......trying hard for many
days but still not succeded.- Hide quoted text -


- Show quoted text -


Its not working....


i have no idea where the file got saved Plus there is one sheet added
in existing data sheet....


No folder name, no file saved with customer name......


Result = Total confussion- Hide quoted text -


- Show quoted text -


Hi Robin

File got saved with this macro but the sheet is blank there is no data
in that saved files....i want all filter data in that sheet

everything works fine till creating folder and saving with Customer
code i.e filter range.....but the sheet is blank

Please help

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I want to Split & save the data in different workbook



you can use the following macro:

Sub CopyData()





Dim LMainWB As String
Dim LNewWB As String
Dim LRow As Integer
Dim LContinue As Boolean

Dim LColAMaster As String
Dim LColATest As String

Dim LWBCount As Integer
Dim LMsg As String

Dim LPath As String
Dim LFilename As String

Dim LColAValue As String

'Path to save all new workbooks to
LPath = "C:\"


'Retrieve name of the workbook that contains the data
LMainWB = ActiveWorkbook.Name

'Initialize variables
LContinue = True
LRow = 2
LWBCount = 0

'Start comparing with cell A2
LColAMaster = "A2"

'Loop through all column A values until a blank cell is found
While LContinue = True

LRow = LRow + 1
LColATest = "A" & CStr(LRow)

'Found a blank cell, do not continue
If Len(Range(LColATest).Value) = 0 Then
LContinue = False
End If

'Value in column A
LColAValue = Range(LColAMaster).Value

'Found occurrence that did not match, copy data to new workbook
If LColAValue < Range(LColATest).Value Then

'Copy headings
Range("A1:D1").Select
Selection.Copy

'Add new workbook and paste headings into new workbook
Workbooks.Add
LNewWB = ActiveWorkbook.Name
ActiveSheet.Paste
Range("A1").Select

'Copy data from columns A - D
Windows(LMainWB).Activate
Range(LColAMaster & ":D" & CStr(LRow - 1)).Select
Selection.Copy

'Paste results
Windows(LNewWB).Activate
Range("A2").Select
ActiveSheet.Paste
Range("A1").Select

'Save (and overwrite, if necessary) workbook with name from
column A
'and then close workbook
LFilename = LPath & LColAValue & ".xls"
If Dir(LFilename) < "" Then Kill LFilename
ActiveWorkbook.SaveAs Filename:=LFilename
ActiveWorkbook.Close

'Go back to Main sheet and continue where left off
Windows(LMainWB).Activate
LColAMaster = "A" & CStr(LRow)

'Keep track of the number of workbooks that have been
created
LWBCount = LWBCount + 1

End If

Wend

Range("A1").Select
Application.CutCopyMode = False

LMsg = "Copy has completed. " & LWBCount & " new workbooks have
been created."
LMsg = LMsg & Chr(10) & "You can find them in the following
directory:" & Chr(10) & LPath

MsgBox LMsg

End Sub


*** Sent via Developersdex http://www.developersdex.com ***
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
When I save a workbook(2007) w/ a data connection to htm no data? Robert Excel Discussion (Misc queries) 0 July 13th 09 01:39 AM
Split data from 1 workbook into multiple workbooks based on criter bUncE Excel Worksheet Functions 0 October 29th 07 03:26 PM
1.Open workbook. 2 copy data. 3 replace data. 4 save workbook. Cristobalitotom Excel Programming 0 July 6th 06 12:24 AM
save data in another workbook Buddy Lee Excel Programming 1 November 22nd 05 08:20 PM
split data in many workbook Dave Peterson[_3_] Excel Programming 0 July 23rd 03 02:47 AM


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