I need to be able to extract a left portion of text; and as well as this add some text at the end based on whether the cell contains a certain code, i.e. “*XXZ” or just “*XX”<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o> </o>
I’ve achieved the first part of this but not the second…<o></o>
<o> </o>
Example:<o></o>
A1: AB123*XXZ-XXZ 0<o></o>
A2: DFG323*XX-XX 5<o></o>
A3: COOK-EF45678*XX-XXY 88<o></o>
<o> </o>
What I want to end up with is:<o></o>
B1: AB123-toast<o></o>
B2: DFG323-jam<o></o>
B3: COOK-EF45678-jam<o></o>
<o> </o>
“-toast” being the replacement for “*XXZ”, and “-jam” being the replacement for “*XX”. Every single cell will have one or other of these two codes.<o></o>
<o> </o>
I know how to do the first part of the formula:<o></o>
=LEFT(A1,FIND("*",A1,1)-1)<o></o>
<o> </o>
This gives me:<o></o>
B1: AB123<o></o>
B2: DFG323<o></o>
B3: COOK-EF45678<o></o>
<o> </o>
But does anyone know how to add the “-toast” and “-jam” ?<o></o>
<o> </o>
A thousand thank yous to any helpers!<o></o>
<o> </o>
I’ve achieved the first part of this but not the second…<o></o>
<o> </o>
Example:<o></o>
A1: AB123*XXZ-XXZ 0<o></o>
A2: DFG323*XX-XX 5<o></o>
A3: COOK-EF45678*XX-XXY 88<o></o>
<o> </o>
What I want to end up with is:<o></o>
B1: AB123-toast<o></o>
B2: DFG323-jam<o></o>
B3: COOK-EF45678-jam<o></o>
<o> </o>
“-toast” being the replacement for “*XXZ”, and “-jam” being the replacement for “*XX”. Every single cell will have one or other of these two codes.<o></o>
<o> </o>
I know how to do the first part of the formula:<o></o>
=LEFT(A1,FIND("*",A1,1)-1)<o></o>
<o> </o>
This gives me:<o></o>
B1: AB123<o></o>
B2: DFG323<o></o>
B3: COOK-EF45678<o></o>
<o> </o>
But does anyone know how to add the “-toast” and “-jam” ?<o></o>
<o> </o>
A thousand thank yous to any helpers!<o></o>