Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default removing cells with certain words in it

What would be the code for the following two things:

#1:
- check the cell in column 4
- if it contains the word "calculated" anywhere in the cell either as a
stand alone word or as part of a larger word - do nothing
- otherwise, go to procedure "proceed".

#2:
- if the contents of the cell meet the following two conditions:
a) contains the digits 1 and 4
b) does not contain the word "calculated" anywhere in the cell either as
a stand alone word or as part of a larger word
then go on to procedure "proceed".
If it doesn't meet the above conditions, do nothing.

Many thanks in advance.

Matthew Kramer



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default removing cells with certain words in it

#1
cell = Cells(ActiveCell.Row,4)
if Instr(1,cell.Text,"calculated",vbTextCompare) = 0 Then
proceed
End if

#2
cell = Cells(ActiveCell.Row,4)
If Instr(1,cell.Text,"1",vbTextCompare) 0 and _
Instr(1,cell.Text,"4",vbTextCompare) 0) and _
Instr(1,cell.Text,"calculated",vbTextCompare) = 0 then
proceed
End if


--
Regards,
Tom Ogilvy

"Matthew Kramer" wrote in message
...
What would be the code for the following two things:

#1:
- check the cell in column 4
- if it contains the word "calculated" anywhere in the cell either as a
stand alone word or as part of a larger word - do nothing
- otherwise, go to procedure "proceed".

#2:
- if the contents of the cell meet the following two conditions:
a) contains the digits 1 and 4
b) does not contain the word "calculated" anywhere in the cell either as
a stand alone word or as part of a larger word
then go on to procedure "proceed".
If it doesn't meet the above conditions, do nothing.

Many thanks in advance.

Matthew Kramer



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default removing cells with certain words in it

Tom,

Many thanks. - Matthew





*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
how to copy cells with some certain words in them mahatchma Excel Worksheet Functions 3 January 6th 09 04:37 PM
Formatting cells containing certain words cecij22 Excel Discussion (Misc queries) 1 September 5th 08 08:05 PM
removing a space between words in a cell JenBasch Excel Worksheet Functions 3 September 20th 05 12:39 AM
removing words/phrase from sentences Runt Excel Programming 7 August 23rd 04 07:51 AM
Removing rows featuring certain words clane Excel Programming 3 July 16th 04 03:12 PM


All times are GMT +1. The time now is 03:14 PM.

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

About Us

"It's about Microsoft Excel"