Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default find cells in a range which equal a specific value

I am trying to allocate a value to a mixed range of values ie 1100 may be
made up of 10 different values
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default find cells in a range which equal a specific value

Hi Keith,

Try something like this (untested):

Dim myRange As Range
Dim oCell As Cell

For Each oCell In myRange.Cells
If oCell.Value < "" Then
Select Case oCell.Value
Case 1
'Do something if the cell = 1
Case 150
'Do something else if the cell = 150
'Add as many Cases as you need
End Select
End If
Next oCell

Best regards

John

"Keith Piggott" <Keith wrote in message
...
I am trying to allocate a value to a mixed range of values ie 1100 may be
made up of 10 different values



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
Adding random #s in a range to equal a specific # Jeff Excel Worksheet Functions 4 April 28th 08 02:46 PM
how can I find which cells in a dataset equal a specific value chrisk Excel Worksheet Functions 1 August 23rd 07 02:42 PM
Selecting values from a range that equal a specific total Matt UK Excel Worksheet Functions 4 November 25th 06 09:42 PM
Determine which cells from a specific range equal a certain sum Maxter21 Excel Worksheet Functions 1 July 20th 05 09:44 PM
Find cell of equal value of a range and give result of ajoining co Word and Excel startup Excel Programming 1 August 4th 04 09:58 PM


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