Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]() I download data from a SAP table into an excel spreadsheet (2000), one field of which contains a string like: A=1,a=5,H=/H/<ip/S/sapdp97/H/oss001,S=01,M=000,U=OSS_RFC,Z=CPIC,X=LB This string can contain values for A, a, B, G, g, H, I, i, L, M, N, N, O, Q, R, S, T, u, U, X, Z in the form A=<value delimited by comma's. Not every string includes all options in which case it is just omitted. For each row I would like to copy the values into columns with matching headers. Looks like a nice enough challenge, but too hard for me to solve quickly. Thanks! -- Menno ------------------------------------------------------------------------ Menno's Profile: http://www.excelforum.com/member.php...o&userid=27869 View this thread: http://www.excelforum.com/showthread...hreadid=473754 |
#2
![]() |
|||
|
|||
![]() I will assume you import your data into column A. Beginning in column B (say row 2) enter the values to look for, e.g. "A=", "a=", ....."X=", "Z=" should run through column V per your example of "A, a, B, G, g, H, I, i, L, M, N, n, O, Q, R, S, T, u, U, X, Z". With your imported data in A3, add a comma at the end of the last entry (e.g. ....Z=CPIC,X=LB*,*) then in B3 enter this Formula: =IF(ISERROR(MID($A$3,FIND(B2,$A$3,1)+2,FIND(",",$A $3,FIND(B2,$A$3,1))-(FIND(B2,$A$3,1)+2))),"",MID($A$3,FIND(B2,$A$3,1)+ 2,FIND(",",$A$3,FIND(B2,$A$3,1))-(FIND(B2,$A$3,1)+2))) This will return "1" (the value of "A=") copy this to C3 and it will return "5" (the value of "a=") copy to D3 will return "" (a blank cell as there is no "B=" value) and so on through V3 which returns "CPIC" (the value of "Z=") NOTE: you _must_ add the comma to the end of the data string in A3 for this formula to return the last value in the string! Does this work for you? -- swatsp0p ------------------------------------------------------------------------ swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101 View this thread: http://www.excelforum.com/showthread...hreadid=473754 |
#3
![]() |
|||
|
|||
![]() Works like a charm. Thank you very much Bruce. Have a nice weekend. Menno. -- Menno ------------------------------------------------------------------------ Menno's Profile: http://www.excelforum.com/member.php...o&userid=27869 View this thread: http://www.excelforum.com/showthread...hreadid=473754 |
#4
![]() |
|||
|
|||
![]() I'm glad it worked for you. Thanks for the feedback, it is always appreciated. Cheers and a good weekend to you as well. -- swatsp0p ------------------------------------------------------------------------ swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101 View this thread: http://www.excelforum.com/showthread...hreadid=473754 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a Difficult Chart | Charts and Charting in Excel | |||
Data Validation - still difficult | Excel Discussion (Misc queries) | |||
Simple Calculation - but Difficult! | Excel Discussion (Misc queries) | |||
Difficult to open files in Excel in different countries | Excel Discussion (Misc queries) | |||
Difficult (for me) formula/UDF calculation | Excel Worksheet Functions |