View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Giber Giber is offline
external usenet poster
 
Posts: 1
Default How to check if a range contains a certain value

What I do is something like this

For each c in (range)
if c.value = "A" then
else
end if
next

"Luc" wrote:

Hello,

A newbie question

I have a range named GRID (3 columns x 10 rows).
Can someone give me some code with which i can check if there is a certain
value in that range.

Example :

I want to check if the GRID contains the value A.
IF it contains A THEN some actions have to follow.

If the GRID contains the value B
some other actions have to follow.

..........

..........


If the GRID contains the value Z
some other actions have to follow.

Thanx for your replies