Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

674.Advanced search and replace -- How to extract column X from csv file where X is decided by column A?

User: editor -- 2010-12-09          << 673  675 >>
Hits: 338
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to extract column X from csv file where X is decided by column A?

How to select column conditionally by the number in column A? If column A is "2", then extract column B, if column A is "3", then extract column C, and so on...
Input Sample:
2,B1,C1,D1,E1,F1
3,B2,C2,D2,E2,F2
5,B3,C3,D3,E3,F3
Output Sample:
B1
C2
E3
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open csv file
2. ctrl-h open 'replace' window
* set 'Replace Unit' to 'Line'
* set 'Replace with pattern' to:

* click 'Settings' page, set 'Input delimiter' to 'other', and enter a comma "," in the following entry.
3. click "Replace", done.
4. ctrl-s save to file.

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Settings_Window


Similar Examples:
How to batch sort csv files by the order of value in the specified column? (60%)
How to delete the 4th column from text files with 8 columns? (59%)
How to extract and join text from multiple files with user defined format? (57%)
How to extract company name ended with "co ltd" from many website? (55%)
How to generate 12 columns EMA with different periods based on "close" value? (54%)
How to extract column 3,6,7,8 from each line of text? (53%)
How to sort a text/csv file by the date DD/MM/YYYY in second column? (52%)
How to multiply the first column with the rest of columns in one file? (52%)

Check Demo of Advanced search and replace
Keywords:
conditional  condition  extract colum  extract column  dec  delimiter  csv  settings  comma  setting  extract column from csv  csv extract column  extract column csv  extract csv  extract number  search by column  csv from  extract and save to file