Macro Needed

  • Thread starter Thread starter BurgrLvr
  • Start date Start date
B

BurgrLvr

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!
 
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.
 
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.
 
From your original post

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.
 
Yes, but two things with that, it extracts but does not remove from second
column and dosen't capilalize anything.
 
Back
Top