Sir,
There are two excel files attached ... What I would like to do is to :-
1> Replace a few field records of file rec.xls from pc01.xls and fields are fat_name,add1,city1,dist1,state1,pin1 ... taking cust_id as unique field
In database I am replacing data by setting relation ...
Sele a
use c:\pc01
inde on cust_id to x
Sele b
use c:\rec
inde on cust_id to xx
set rela to to cust_id into a
repl all fat_name with a.fat_name,add1 with a.add1,city1 with a.city1,dist1 with a.dist1,state1 with a.state1,pin1 with a.pin1
2> What are the common and uncommon or available and unavailable data in both the files and a separate answers shall be generated in four files (ex. pc01_av,pc01_unav,rec_av & rec_unav). In Databse I am doing my task as below :
sele * from c:\pc01 where cust_id in (sele cust_id from rec)
sele * from c:\pc01 where cust_id not in (sele cust_id from rec)
sele * from c:\rec where cust_id in (sele cust_id from pc01)
sele * from c:\rec where cust_id not in (sele cust_id from pc01)
Sir, My interest in to know how to perform the same task in excel ...
replace the data in excel file
-
- Administrator
- Posts: 78650
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: replace the data in excel file
If you import the sheets into a database, you can easily run your queries.
Your question "how to perform the same task in excel" is very broad, so I'll give a general answer.
In Excel, you can use VLOOKUP formulas to fill the columns in rec.xls with the corresponding data from pc01.xls.
This will also tell you which rows have a match and which ones don't.
Your question "how to perform the same task in excel" is very broad, so I'll give a general answer.
In Excel, you can use VLOOKUP formulas to fill the columns in rec.xls with the corresponding data from pc01.xls.
This will also tell you which rows have a match and which ones don't.
Best wishes,
Hans
Hans
-
- StarLounger
- Posts: 77
- Joined: 15 Jan 2011, 02:32
Re: replace the data in excel file
Yah , it works .. thanks for the guidance