Find cell value in another .CSV file

  • Thread starter Thread starter ledzepe
  • Start date Start date
L

ledzepe

Hello everyone,

I've another challenge; two .CSV file one is named first.csv and th
other second.csv. Column A of first.csv contains the account number
and each account number is unique.

Second.csv column A has again the account number but can be repeated a
it is the record of the activity of the accounts. Each account numbe
has four columns of other information.

What I want to do is get the info on second.csv and add that 4 colum
of other info on the corresponding row of that particular accoun
number in first.csv.

Sample first.csv
Acct_No Beg_Amt Name
R12345 420.23 MyName
R25122 100.00 YourName

Sample second.csv
Acct_No Trans_Amt Date Time
R12345 -60.23 02/08/2006 0800
R12345 +5.66 02/08/2006 0802

I want to get the two rows in second.csv and add that each row afte
the "Name" column in the first.csv
 
Of course you must first import both CSV files into Excel, say on separate
sheets,,,,,and break them out so each value is in it's own column, like with
Data > TextToColumns......then, I would use the VLOOKUP on the second file
to add the Beg_Amt and Name to all the rows in the second sheet.......like
in Sheet2 cell E2 put

=VLOOKUP(A2,Sheet1!A:C,2,false) to bring in the Beg_Amt,

and in Sheet2 cell F1 put

=VLOOKUP(a2,Sheet1!A:C,3,false) to bring in the Name .

Then copy both of these fomulas down as far as you have data in columns A:D,
and then Copy > PasteSpecial > Values over both columns to get rid of the
formulas........then re-arrange the columns as you wish.

hth
Vaya con Dios,
Chuck, CABGx3
 
Back
Top