Thread: Begins with
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chris Lewis[_2_] Chris Lewis[_2_] is offline
external usenet poster
 
Posts: 11
Default Begins with


"StephanieH" wrote in message
...
Can anyone tell me how to correct his line?
If ActiveCell.Value = "C1*" Then ActiveCell.Offset(0, -1) = "Primary"

I'm basically trying to evaluate if the value in the cell begins with C1
then write the word "Primary" in the cell next to it.

When I hover over ActiveCell.Value, it give me C1ARM so I know it's seeing
it correctly, I guess just not recognizing the C1* part?



Try

If Left(Activecell.Value, 2) = "C1" then ....

Note this only checks the first two characters of the active cell value
which is slightly different to C1*.


--
Chris Lewis