Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default Comparing relative cells and making values dependent

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
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
making cells change relative to each other? cant figure out help plz MMA Excel Discussion (Misc queries) 7 June 14th 06 12:49 AM
making cells change relative to each other, cant figure out MMA Excel Programming 1 June 13th 06 12:34 PM
making cells change relative to each other? cant figure it out MMA Excel Worksheet Functions 1 June 13th 06 08:09 AM
making cells change relative to each other? MMA Excel Worksheet Functions 0 June 13th 06 05:18 AM


All times are GMT +1. The time now is 10:33 PM.

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

About Us

"It's about Microsoft Excel"