Thread: Macro Needed
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default 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!