Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Select and Move based upon keyword

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

.........


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

.........



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
Need to bold a cell based on keyword in another cell... Max Excel Discussion (Misc queries) 3 February 17th 10 09:46 PM
Select sheets ina workbook based on radio buttons and move them Larry Fitch Excel Worksheet Functions 4 September 28th 09 01:42 AM
Select & Move Range Gene Augustin Excel Discussion (Misc queries) 4 February 15th 09 05:27 PM
Select rows based on keyword? Niniel Excel Discussion (Misc queries) 14 September 21st 07 08:18 PM
Insert text in Cell A1 based on keyword criteria [email protected] Charts and Charting in Excel 1 June 13th 06 04:56 PM


All times are GMT +1. The time now is 09:23 AM.

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"