Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Checking characters using VBA

I would like to check the first 9 characters in a cell. If
they match then return false. For example: If a cell does
not have "includes:" as the first word then delete a
specific range. Thanks

Gary
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Checking characters using VBA

Gary
This little macro will check the active cell and clear a range if
"includes:" is not the first 9 characters. Post back if this just gets you
started and you need further help. HTH Otto
Sub CheckIncludes()
If Left(ActiveCell.Value, 9) < "includes:" Then
Range("C1:C10").ClearContents
Else
'do something else
End If
End Sub
"Gary" wrote in message
...
I would like to check the first 9 characters in a cell. If
they match then return false. For example: If a cell does
not have "includes:" as the first word then delete a
specific range. Thanks

Gary



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
Checking characters , non-printable etc. dhstein Excel Discussion (Misc queries) 1 February 25th 10 11:57 PM
Spell Checking with checking cell notes jfitzpat Excel Discussion (Misc queries) 0 August 8th 07 10:26 PM
Checking a cell for only Alphanumerical characters Trefor Excel Worksheet Functions 2 August 3rd 07 10:38 AM
if function checking for numerical data vs alpha characters Omar Excel Worksheet Functions 1 May 22nd 06 07:46 PM
In Excel find characters when multiple characters exist w/i a cel teacher-deburg Excel Worksheet Functions 1 December 5th 05 10:22 PM


All times are GMT +1. The time now is 06:03 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"