Select and Move based upon keyword

  • Thread starter Thread starter PJohnson
  • Start date Start date
P

PJohnson

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

.........
 
Pete

Try the following

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

ELSE

ENDIF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top