Luking for a VBA code to Generate multiple files

faizumarali

Board Regular
Joined
Jul 23, 2008
Messages
89
Office Version
  1. 365
Platform
  1. Windows
As shown below in sheeet1 i have 3 columns and more than 15000 rows from which i have to generate .DIF files for each records in C:\Output


REF NO,PERSON ID,AMOUNT

110000689043,10015026737994,1262.00

110000689652,30417018370966,1100.00

110000396227,10001058163457,1600.00

110000480538,10001058163457,1600.00

110000480367,10006077698756,2500.00

110000440265,30412057258012,1100.00

110000686411,30412057258012,1350.00

110000439832,10009048277776,1600.00

110000686413,10009048277776,1900.00

110000439832,10011077207916,5600.00


My sample DIF file is in the folder C:\Input


DIF file has got two lines:

1st line with DIR details
2nd line with DCR details


Please find the below link for

Sample DIF FILE http://www.box.net/shared/49ypi29ula
Screenshot http://www.box.net/shared/j44086zenh


From the sample file only the REF NO, PERSON ID, AMOUNT will keep on changing in each file.

that is from the screenshot highlighted in PINK color is REF NO, BLUE is PERSON ID, GRAY is the AMOUNT. YELLOW values will be unchanged


Generated DIF file names should be in the format 314YYMMDDHHMMSS.DIF that is 314 is constant YY for year MM for month DD for date HH for hour MM for min SS is sec My sample file name is 314110304101001.DIF. The time between each file creation can be put as 1 or 2 seconds.


Please help. Thank you all for going through this post.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,141,847
Messages
5,708,959
Members
421,601
Latest member
Garlo

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