Daghs
New member
- Joined
- Apr 22, 2021
- Messages
- 13
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- Excel10
Hi,
I have a very limited knowledge about vbscript so I am not sure what is possible in vbscript and what is not but I want if my problem could be solved with vbscript code .
The word column I'm using here is just for explaining as we use in excel sheet I dont know how to mention it in .csv way!
The problem I am having is something like this!
I have a file named "list.csv" & a folder named "WORKERS".
Now this folder has .csv files which are generated on daily basis & has just 2 rows of daily wages details.
In "WORKERS" folder file names are listed in list.csv file's first column as serials.
Now what I want is, if "WORKERS" folder file name matches in the first column's row of list.csv "the entire 2nd row of that file to be pasted in list.csv file's 3rd column of matched row"
For example,
List.csv has 2nd row
= "AL,Alex Chris,"
in which AL is a serial & now "WORKERS" folder has matched file named AL.csv with serial so the 2nd row of file AL.csv
= "800,100,200,0,0,80,0"
should be copied in list.csv at the end of the matched row which becomes
= "AL,Alex Chris,800,100,200,0,0,80,0"
If for any reason the file is not generated row must be shown "NOT AVAILABLE"
= "AL,Alex Chris,NOT AVAILABLE"
The way I see it. It's just an act of locating and merging two lines but if somebody has to do it for couple of hundred times daily it becomes an awful job!
I've also attached zip for file and folder. I hope I could get some help here!
Thanks.
I have a very limited knowledge about vbscript so I am not sure what is possible in vbscript and what is not but I want if my problem could be solved with vbscript code .
The word column I'm using here is just for explaining as we use in excel sheet I dont know how to mention it in .csv way!
The problem I am having is something like this!
I have a file named "list.csv" & a folder named "WORKERS".
Now this folder has .csv files which are generated on daily basis & has just 2 rows of daily wages details.
In "WORKERS" folder file names are listed in list.csv file's first column as serials.
Now what I want is, if "WORKERS" folder file name matches in the first column's row of list.csv "the entire 2nd row of that file to be pasted in list.csv file's 3rd column of matched row"
For example,
List.csv has 2nd row
= "AL,Alex Chris,"
in which AL is a serial & now "WORKERS" folder has matched file named AL.csv with serial so the 2nd row of file AL.csv
= "800,100,200,0,0,80,0"
should be copied in list.csv at the end of the matched row which becomes
= "AL,Alex Chris,800,100,200,0,0,80,0"
If for any reason the file is not generated row must be shown "NOT AVAILABLE"
= "AL,Alex Chris,NOT AVAILABLE"
The way I see it. It's just an act of locating and merging two lines but if somebody has to do it for couple of hundred times daily it becomes an awful job!
I've also attached zip for file and folder. I hope I could get some help here!
Thanks.