Thread: Checking a cell
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Checking a cell

Hi
try something like
sub foo()
Dim rng as range
dim row_count
set rng = selection

for row_count = rng.row to rng.rows.count + rng.row - 1
if cells(row_count,3).value cells(row_count,"AU").value then
cells(row_count,4).value = "PASS"
next
next
end sub


--
Regards
Frank Kabel
Frankfurt, Germany

Robert Couchman wrote:
hello,

i have a number of rows in excel that hold information
about recruitment, one of these fields is there score, i
am trying to input a piece of program that will check the
cell reference "C" on the row selected against cell "AU1"
then if the cell reference "C" is greater then the
cell "AU1" then it will put "Pass" in the cell
reference "D" on that row.

i have tried using: FOR EACH CELL IN RNG, and using the
offset command, but these seems to only update the fist
row in my records.

any help please???

thank you,

Robert Couchman