PC Review


Reply
Thread Tools Rate Thread

Comparing relative cells and making values dependent

 
 
Arnold
Guest
Posts: n/a
 
      8th Jan 2007
Hi All,

It's amazing how many 'little things' are involved in making an
application. In a school workbook, there will be 3 columns,
"Attendance", "Performance", and "Behavior" that will be inserted with
a macro for each day of school. These 3 columns as well as others,
such as "Progress Notes" and "Assignments" (which can also be added via
macros) go horizontally, while each row is a student record.

If a teacher enters a 0 in a cell in the "Attendance" column, I'd like
Excel to automatically insert zeros for "Performance" and "Behavior",
which will always be the 2 columns to the right of "Attendance". This
makes sense because if a student is absent, he or she cannot perform
and receive behavior points. However, I do not want 0s or anything
filled in if the "Attendance" cells are left blank (no 0s showing).

Additionally, if a number from 1 to 5 is entered in an "Attendance"
cell, Excel should make sure that teachers enter values in the next two
columns, "Performance" and "Behavior". Scores for all three columns
must range from 0 to 5.

Lastly, I'd like for teachers to be able to put a letter into the
"Attendance" column, such as "x" or "X" for an excused absence.

Note that each of these columns will be used in formulas, so the
insertion of a letter should not interfere with calculations. Also
note that all cell addresses or references will be relative, but column
headings will remain the same across the sheet.

I came across a thread here that is partially useful--"how to compare
the active cell value to the previous cell's value" by Nigel, which
included the code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
If ActiveCell.Value <> ActiveCell.Offset(-1, 0).Value Then
MsgBox "Do something"
End If
End If
End Sub

Any help expanding on this to include the desired functionality would
be greatly appreciated.

Sincerely,
Eric

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
making cells change relative to each other, cant figure out MMA Microsoft Excel Programming 1 13th Jun 2006 12:34 PM
making cells change relative to each other? cant figure it out MMA Microsoft Excel Worksheet Functions 1 13th Jun 2006 08:09 AM
making cells change relative to each other? MMA Microsoft Excel Worksheet Functions 0 13th Jun 2006 05:18 AM
making cell values change relative to each other? cant figure out ;/ pete321 Microsoft Excel Programming 0 13th Jun 2006 04:57 AM
How do I make X-values of a chart dependent on values in cells? Kashgarinn Microsoft Excel Charting 4 5th May 2004 03:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:14 AM.