Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Needed
I need a macro to separate data in column A at the FIRST hyphen and
capitalize the first letter in column B after separation. Can anyone help me on this? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Needed
Hi,
You can have a macro if you want but you don't need one. To extract the text after the hyphen an capitalise the first letter use this and drag down =UPPER(LEFT(MID(A1,FIND("-",A1)+1,LEN(A1)),1))&MID(A1,FIND("-",A1)+2,LEN(A1)) and if you want to extract the first part before the hyphen =LEFT(A1,FIND("-",A1)-1) -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "BurgrLvr" wrote: I need a macro to separate data in column A at the FIRST hyphen and capitalize the first letter in column B after separation. Can anyone help me on this? Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Needed
Hi Mike, I want to text to columns to separate the data into two columns at
the first hyphen and capitalize the first letter in both columns with no preceding spaces. "Mike H" wrote: Hi, You can have a macro if you want but you don't need one. To extract the text after the hyphen an capitalise the first letter use this and drag down =UPPER(LEFT(MID(A1,FIND("-",A1)+1,LEN(A1)),1))&MID(A1,FIND("-",A1)+2,LEN(A1)) and if you want to extract the first part before the hyphen =LEFT(A1,FIND("-",A1)-1) -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "BurgrLvr" wrote: I need a macro to separate data in column A at the FIRST hyphen and capitalize the first letter in column B after separation. Can anyone help me on this? Thanks! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Needed
From your original post
I need a macro to separate data in column A at the FIRST hyphen and This suggests you have more than one hyphen so text to columns will split on EVERY hyphen. Did you try the 2 formula I gave you? -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "BurgrLvr" wrote: Hi Mike, I want to text to columns to separate the data into two columns at the first hyphen and capitalize the first letter in both columns with no preceding spaces. "Mike H" wrote: Hi, You can have a macro if you want but you don't need one. To extract the text after the hyphen an capitalise the first letter use this and drag down =UPPER(LEFT(MID(A1,FIND("-",A1)+1,LEN(A1)),1))&MID(A1,FIND("-",A1)+2,LEN(A1)) and if you want to extract the first part before the hyphen =LEFT(A1,FIND("-",A1)-1) -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "BurgrLvr" wrote: I need a macro to separate data in column A at the FIRST hyphen and capitalize the first letter in column B after separation. Can anyone help me on this? Thanks! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Needed
Yes, but two things with that, it extracts but does not remove from second
column and dosen't capilalize anything. "Mike H" wrote: From your original post I need a macro to separate data in column A at the FIRST hyphen and This suggests you have more than one hyphen so text to columns will split on EVERY hyphen. Did you try the 2 formula I gave you? -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "BurgrLvr" wrote: Hi Mike, I want to text to columns to separate the data into two columns at the first hyphen and capitalize the first letter in both columns with no preceding spaces. "Mike H" wrote: Hi, You can have a macro if you want but you don't need one. To extract the text after the hyphen an capitalise the first letter use this and drag down =UPPER(LEFT(MID(A1,FIND("-",A1)+1,LEN(A1)),1))&MID(A1,FIND("-",A1)+2,LEN(A1)) and if you want to extract the first part before the hyphen =LEFT(A1,FIND("-",A1)-1) -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "BurgrLvr" wrote: I need a macro to separate data in column A at the FIRST hyphen and capitalize the first letter in column B after separation. Can anyone help me on this? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
PLEASE HELP MACRO NEEDED | Excel Programming | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Macro needed to set macro security in Excel to minimum | Excel Programming | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |