ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   I need to change cell string lenths prior to upload into sql table (https://www.excelbanter.com/excel-worksheet-functions/108760-i-need-change-cell-string-lenths-prior-upload-into-sql-table.html)

kevt

I need to change cell string lenths prior to upload into sql table
 
HI I need to get text into limited string lenths between two sql tables, one
outputs a 60 string lenth and the input will only take 45 characters.so I
need to split at character 46 but then merge the next line to the 15 that was
split from the cell before !
example :
cell 1 100 FOOT OF 3.1/4" TAB R CHAIN @ 4.00PDS / FO
cell2 OT
cell 3 80 FOOT OF 3.1/4" TAB CHAIN @ 3.50PDS / FOOT

So cell one have been truncated at character 45 and character 46 and 47 have
been split onto cell 2 but now I need to merge cell 3 into cell 2 and then
truncate that at character 45.
Any help would be apreciated

regards

Kev


Toppers

I need to change cell string lenths prior to upload into sql table
 
Try:

Assuming data in colum A, starting A1:

in B1 =LEFT(A1,45)
in B2 and copy down: =RIGHT(A1,LEN(A1)-45)&LEFT(A2,90-(LEN(A1)))

HTH

"kevt" wrote:

HI I need to get text into limited string lenths between two sql tables, one
outputs a 60 string lenth and the input will only take 45 characters.so I
need to split at character 46 but then merge the next line to the 15 that was
split from the cell before !
example :
cell 1 100 FOOT OF 3.1/4" TAB R CHAIN @ 4.00PDS / FO
cell2 OT
cell 3 80 FOOT OF 3.1/4" TAB CHAIN @ 3.50PDS / FOOT

So cell one have been truncated at character 45 and character 46 and 47 have
been split onto cell 2 but now I need to merge cell 3 into cell 2 and then
truncate that at character 45.
Any help would be apreciated

regards

Kev



All times are GMT +1. The time now is 12:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com