Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 10
Default selecting multiple cell in a roll that falls withing a range

Gentlemen,

Using VBA, is it posible to select all the cells in column A which their
value fall in between 5 and 10
i.e select all cells in columnA =5 and =< 10



  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 4,393
Default selecting multiple cell in a roll that falls withing a range

The subrountine below will do that, but if you just want to highlight them
do you know about Conditional Formatting?

Sub Check()
myrange = ""
For j = 1 To 100
mytest = Cells(j, 1).Value
If mytest = 5 And mytest <= 10 Then
myrange = myrange & "A" & j & ","
End If
Next j
myrange = Mid(myrange, 1, Len(myrange) - 1)
'MsgBox myrange
Range(myrange).Select
End Sub

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Olamide" wrote in message
...
Gentlemen,

Using VBA, is it posible to select all the cells in column A which their
value fall in between 5 and 10
i.e select all cells in columnA =5 and =< 10





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
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Checking if a certain day falls in a range Jaydubs Excel Discussion (Misc queries) 6 March 16th 06 01:51 PM
update cell only if now() falls in a given date range treyn1292 Excel Worksheet Functions 0 February 16th 06 08:54 PM
Data falls in a range +/-1 SMac Excel Worksheet Functions 3 November 28th 05 08:34 PM
Selecting a cell in a range Coolboy55 Excel Worksheet Functions 0 August 31st 05 07:17 PM


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

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

About Us

"It's about Microsoft Excel"