take some data column into next column ie ABC-DEF-GHI i want DEF
i want to copy the mid section of the data in a column into the next column.
each row has a cell with this "ABC-DEF-GHI" configuration of date. i only want "DEF" (the middle section) |
take some data column into next column ie ABC-DEF-GHI i want DEF
One of these should work:
If always that exact structu =MID(A2,5,3) If structure varies, but middle is always 3 characters: =MID(A2,FIND("-",A2)+1),3) If structure varies and middle is not always 3 characters: =MID(A2,FIND("-",A2)+1,FIND("-",MID(A2,FIND("-",A2)+1,999))-1) -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Bernard" wrote: i want to copy the mid section of the data in a column into the next column. each row has a cell with this "ABC-DEF-GHI" configuration of date. i only want "DEF" (the middle section) |
take some data column into next column ie ABC-DEF-GHI i want DEF
Hi
TextToColumns function on the data menu is what you need. Use the wizard, dash as delimiter skip first and last column, and set destination to next column. Hopes this helps. .... Per "Bernard" skrev i meddelelsen ... i want to copy the mid section of the data in a column into the next column. each row has a cell with this "ABC-DEF-GHI" configuration of date. i only want "DEF" (the middle section) |
take some data column into next column ie ABC-DEF-GHI i want DEF
one way:
=MID(A1,FIND("-",A1)+1,3) On 10 Lis, 14:51, Bernard wrote: i want to copy the mid section of the data in a column into the next column. each row has a cell with this "ABC-DEF-GHI" configuration of date. i only want "DEF" (the middle section) |
take some data column into next column ie ABC-DEF-GHI i want DEF
For a formula solution, use FIND within a MID formula. Or use a macro with
INSTR and INSTRREV -- Don Guillett Microsoft MVP Excel SalesAid Software "Bernard" wrote in message ... i want to copy the mid section of the data in a column into the next column. each row has a cell with this "ABC-DEF-GHI" configuration of date. i only want "DEF" (the middle section) |
take some data column into next column ie ABC-DEF-GHI i want DEF
Try
=MID(TRIM(LEFT(SUBSTITUTE(A1,"-",REPT(" ",255),2),255)),FIND("-",A1)+1,255) If this post helps click Yes --------------- Jacob Skaria "Bernard" wrote: i want to copy the mid section of the data in a column into the next column. each row has a cell with this "ABC-DEF-GHI" configuration of date. i only want "DEF" (the middle section) |
take some data column into next column ie ABC-DEF-GHI i want DEF
Per
You think like I do. Why use formulas when you don't have to. Gord Dibben MS Excel MVP On Tue, 10 Nov 2009 14:57:38 +0100, "Per Jessen" wrote: Hi TextToColumns function on the data menu is what you need. Use the wizard, dash as delimiter skip first and last column, and set destination to next column. Hopes this helps. ... Per "Bernard" skrev i meddelelsen ... i want to copy the mid section of the data in a column into the next column. each row has a cell with this "ABC-DEF-GHI" configuration of date. i only want "DEF" (the middle section) |
All times are GMT +1. The time now is 03:57 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com