Macro that takes multiple csv files and puts
Solved/Closed
sacklin
Posts
2
Registration date
Wednesday June 25, 2008
Status
Member
Last seen
July 9, 2008
-
Jul 9, 2008 at 07:53 AM
jrog - Jun 1, 2010 at 10:47 AM
jrog - Jun 1, 2010 at 10:47 AM
Related:
- Macro that takes multiple csv files and puts
- How to delete multiple files on mac - Guide
- Clear recent files windows 11 - Guide
- How to open msi files on android - Guide
- Allow multiple downloads chrome - Guide
- Potplayer recent files - Guide
2 responses
Give this a try!
' ********************************************************************************
Sub test2()
Sheets("WS To be Loaded into").Select ' Where to load csvs
load_csv 65, "A988", "A1:D2", "\first.csv" 'A998 is destination cell, A1:D2 is CSV Range to copy
load_csv 66, "A993", "A1:C3", "\second.csv"
End Sub
' ********************************************************************************
' ********************************************************************************
Sub load_csv(counter, toRange, fromRange, csvName)
' Range(toRange).Activate
Range(toRange).Select
Workbooks.Open Filename:=ActiveWorkbook.Path & csvName
'Range(fromRange).Activate
Range(fromRange).Select
Selection.Copy
ActiveWindow.ActivateNext
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.ActivateNext
Application.CutCopyMode = False
ActiveWindow.Close
End Sub
' ********************************************************************************
' ********************************************************************************
Sub test2()
Sheets("WS To be Loaded into").Select ' Where to load csvs
load_csv 65, "A988", "A1:D2", "\first.csv" 'A998 is destination cell, A1:D2 is CSV Range to copy
load_csv 66, "A993", "A1:C3", "\second.csv"
End Sub
' ********************************************************************************
' ********************************************************************************
Sub load_csv(counter, toRange, fromRange, csvName)
' Range(toRange).Activate
Range(toRange).Select
Workbooks.Open Filename:=ActiveWorkbook.Path & csvName
'Range(fromRange).Activate
Range(fromRange).Select
Selection.Copy
ActiveWindow.ActivateNext
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.ActivateNext
Application.CutCopyMode = False
ActiveWindow.Close
End Sub
' ********************************************************************************
Hello,
I want help in Excel macro,I have a excel file which is not in good format.I want to calculate a time according to condition below like, if i raised some ticket(regarding work) which has unique ticket number in one column A1 and in B1 cell i have following information, like the name of the person who has first taken that ticket on his account, then after uncertain space it has information like Assisgned/WIP/closed(status) then space and then time(assignment time) then some more information. But, it can be possible that one ticket number can be assigned and make WIP around 5 to 6 times.
I want my macro to calculate the total time starting from the first WIP status till the last.I am trying to make it in two ways.
1) My macro either should read the text WIP in cell B1 and take the just next text(which is time) after the status WIP.But i am unable to do like this.Since,the space between WIP and date is not fixed.
Second approach
2)I can first copy the source file in text file and from there i can write macro to break the text into column and copy the text file into my destination excel and from there i can write macro to calculate the ticket status,Since,in this way i can get the data in row and column wise and then i can calculate the time.
kindly help me.It is really very important for me.It will be a great help if somebody can help me.
I want help in Excel macro,I have a excel file which is not in good format.I want to calculate a time according to condition below like, if i raised some ticket(regarding work) which has unique ticket number in one column A1 and in B1 cell i have following information, like the name of the person who has first taken that ticket on his account, then after uncertain space it has information like Assisgned/WIP/closed(status) then space and then time(assignment time) then some more information. But, it can be possible that one ticket number can be assigned and make WIP around 5 to 6 times.
I want my macro to calculate the total time starting from the first WIP status till the last.I am trying to make it in two ways.
1) My macro either should read the text WIP in cell B1 and take the just next text(which is time) after the status WIP.But i am unable to do like this.Since,the space between WIP and date is not fixed.
Second approach
2)I can first copy the source file in text file and from there i can write macro to break the text into column and copy the text file into my destination excel and from there i can write macro to calculate the ticket status,Since,in this way i can get the data in row and column wise and then i can calculate the time.
kindly help me.It is really very important for me.It will be a great help if somebody can help me.
Jun 1, 2010 at 10:47 AM