+ Reply to Thread
Results 1 to 2 of 2

Looking for VBA code to import data from two csv files into Excel sheet1 and sheet2 b

  1. #1
    Registered User
    Join Date
    12-22-2010
    Location
    AUH, UAE
    MS-Off Ver
    Excel 2003
    Posts
    1

    Post Looking for VBA code to import data from two csv files into Excel sheet1 and sheet2 b

    I am attaching the files for your reference.

    MASTER FILE

    http://www.box.net/shared/dat9pgal4o


    PAF FILE

    http://www.box.net/shared/itz4dbg48h


    PSI FILE

    http://www.box.net/shared/cdj0szqhj3



    My datas are in the path "C:\Temp"


    I have three files named 0001.PAF, 0002.PSI & Master File.xls


    The first two files (name of the file will be different each time) are basically CSV files but their extention changed from CSV to PAF & PSI respectively.


    0001.PAF has the fields from column A to Column J.
    The required fields in the context are Column B,E,F,G,H


    0002.PAF has the fields from Column A to Column J (in which column E,F,G,H,I blank)
    The required fields in the context are Column B & C



    POINTS:

    1. PAF Files contains the salary details of the employee Column G+H is the total salary of the employee
    2. PSI file contains the name of the employee
    3. There is 14 digit no in these two PAF & PSI files which is the employee id and is required to identify the correct employee and correct salary by using VLOOKUP function



    My task is to import the data contained in two files that is 0001.PAF & 0002.PSI (basically CSV file only the extension different) into sheet1 and sheet2 of Master File.xls based on the follwoing conditions

    1. The data should be imported after using the VLOOKUP function, so as to ensure the accuracy of the data
    2. Employee Name should be sorted in the alphabetical order
    3. Salary amount should be the total salary ie G+H from PAF FILE
    4. Total Salary should be splitted into currency denomination of 500,100,50,20,10,5,1
    5. The data should have Header (The co name in the header is there is the last name in PSI file)
    6. The data should have Footer (The data always: SALARY PAYOUT by: XYZ CO LTD
    7. The alignment and format of the data should be as per the Master File



    Kindly note my Output file Master File.xls for your refenece



    Thank you all for going through my post. Awaiting for a solution. Thank you

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Looking for VBA code to import data from two csv files into Excel sheet1 and shee

    Hello faizumarali,

    Welcome to the Forum!

    As a courtesy, we ask that members please post the links to other groups where they have posted their question. This reduces duplication of answers and respects the time, effort, and knowledge of those helping you.

    As a new member, please take some time to familiarize yourself with the rules.
    Forum Rules


    Cross posted http://www.mrexcel.com/forum/showthread.php?t=517021
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1