My intention: I hope to generate the sql statement of insert from the records in excel.
my excel format
1 | number segment | match code | province | City |
2 | 130 | 1300002 | Anhui | Chaohu |
Step 1: Select the last empty cell in the second row (2nd row, 6th column)
Step 2: Edit the formula that concatenates the sql string in the selected cell
=CONCATENATE("insert into check_credit (id,code,match_code,province,city) values ('",A2,"','",B2,"','",C2,"','",D2,"','",E2,"')")
Step 3: Select the cell, then press ctrl+shift+down arrow key to select the following cells to be filled with the sub-formula
Step 4: ctrl+d to complete formula filling