View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nicholas B Nicholas B is offline
external usenet poster
 
Posts: 15
Default Select and Move based upon keyword

Pete

Try the following

TestValu = CStr(ActiveCell.Value)
IF INSTR(UCASE(TestValu),"SCHOOL") 0 then ' word school is in the cell

ELSE

ENDIF

"PJohnson" wrote:

I am trying to find a way to select and move cell values based upon the
originating cell containing a keyword, like "School" or whatever. In the
following code, it only finds and moves cells that contain only the word
"School". What it I wanted to select and move cells that containted the
keyword "School", like "School of Business" or "Agriculture School".

I cannot find an object to handle this.

Any help appreciated.

Pete

================================
Select Case ActiveSheet.Cells(i, k).Value
Case ""
ActiveSheet.Cells(i, k).Select
Case "School"
If ActiveSheet.Cells(i, k + L).Value = "" Then
ActiveSheet.Cells(i, k).Select

.........