Checking a cell

  • Thread starter Thread starter Robert Couchman
  • Start date Start date
R

Robert Couchman

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
 
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
 
Hi,

im afraid your solution seems to give the same answer as
mine, it will do a logical lookup for the first row, but
then repeats that data through the rest of the rows!

if anyone can help please do so!

Thnak you,

Robert Couchman
 
BIG APPOLOGY!!!

yes i had tried the code, but it didnt work, logically i
have found out why it will not do the check!

the update for the cell for that is being used as a cell
to check to was not a value! i acidently inputed the data
as text, therefore no mathmatical lookup would work!!

my humble appology!!

just had to sift through lots of code to find it!!
sorry!!

Thank you,

Robert Couchman

P.S. original code worked perfect after, sorry i didnt use
your code but i do not need to select the information as i
have 600 records!!
 
Back
Top