Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Checking a cell

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   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Checking a cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Checking a cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Checking a cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Checking a cell

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
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
Checking one cell, if number is a range then this Jenn Excel Worksheet Functions 4 September 3rd 09 06:21 PM
checking for a particular string in a cell Christopher Naveen[_2_] Excel Worksheet Functions 3 April 15th 08 12:54 PM
Spell Checking with checking cell notes jfitzpat Excel Discussion (Misc queries) 0 August 8th 07 10:26 PM
Checking cell for Number Lee New Users to Excel 2 October 11th 05 09:23 PM
cell checking Lee New Users to Excel 5 August 25th 05 08:43 PM


All times are GMT +1. The time now is 09:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"