LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Search if a cell range contains a particular value

I'm trying to write a macro that will look at a selected range of cells and
if any of them contains a certain value, then a number 1 will be put in a
paticular cell, say...B9.
Here is what I have.


Range("D" & (a) & ":D" & (b)).Select
If Selection = "Test" Then Range("S" & a).Value = 1



It obviously doesn't work, but I'm looking for suggestions

Thanks,
Paul


 
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
Search for specific text within last non blank cell in a range Bevo Excel Worksheet Functions 2 September 5th 09 08:15 AM
Search Range for Criteria in given cell and produce results RFreeman12 Excel Discussion (Misc queries) 3 June 27th 05 09:23 PM
Search a Range for a phrase and Format cell if found [email protected] Excel Programming 3 June 26th 05 10:22 PM
Limit search range then loop thru' each cell...a bit stuck... ste mac Excel Programming 1 December 17th 04 01:35 PM
search range, if exist, copy cell marcus76 Excel Programming 2 October 11th 04 06:01 PM


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