Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
have you tested it?. The macro should process each row individually -- Regards Frank Kabel Frankfurt, Germany Robert Couchman wrote: 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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!! |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
no problem with that :-) Glad it works now -- Regards Frank Kabel Frankfurt, Germany Robert Couchman wrote: 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!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Checking one cell, if number is a range then this | Excel Worksheet Functions | |||
checking for a particular string in a cell | Excel Worksheet Functions | |||
Spell Checking with checking cell notes | Excel Discussion (Misc queries) | |||
Checking cell for Number | New Users to Excel | |||
cell checking | New Users to Excel |