#1   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Max if variable begins with JICDB Excel Worksheet Functions 3 August 7th 09 03:00 PM
Sumif and begins with nich Excel Discussion (Misc queries) 6 July 22nd 09 12:11 PM
If statement - begins with grantr Excel Discussion (Misc queries) 6 October 31st 08 06:35 PM
Begins with [email protected] Excel Programming 1 January 10th 07 01:54 PM
Begins with Don Guillett Excel Programming 0 January 10th 07 01:52 PM


All times are GMT +1. The time now is 06:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"