General discussion

Locked

Excel Formula help!!!!

By Whatme? ·
I am trying to make a class attendance register. I am trying to add ranges.
If I put a one (1) in each cell... no problem. BUT, i have to enter "Excused", Late, and Truant. I thought maybe that I might enter E, L or T and use an IF statement to change the text to a number. Is this possible and if so what formulae would I need to do each of these.
Thank you for any help
Merv
mervt@arctic.ca

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Excel Formula help!!!!

by Larry H. In reply to Excel Formula help!!!!

Type your code (A for attended, E, L, or T as you mentioned above). Then create formulas to count each of the four codes.

If you used cells D1:D20 to enter the codes the formula to count the number of "A"s would be:
=COUNTIF(D1:D20,"A")

Collapse -

Excel Formula help!!!!

by Whatme? In reply to Excel Formula help!!!!

Thank you very much. I tries several configs close to that but it was staring me right in the face. It helps a lot
Merv

Collapse -

Excel Formula help!!!!

by Oliver W. In reply to Excel Formula help!!!!

Use VBA and create a function like this

Public Function Attendance (Value as String) As Integer
'Now we have to differentiate the ELT
Select Case Value
Case E
Attendance = 1
Case L
Attendance = 2
Case T
Attendance = 3
Case Else
Attendance = -1
End Select
End Function

Now you can put this in a regular Cell and use it like any other Formula (e.g in A2: "=Attendance(A3)" will return 1,2,3 or -1 in any other case.

Hope that helps
Oliver

Collapse -

Excel Formula help!!!!

by Whatme? In reply to Excel Formula help!!!!

Thanks but fist answer was shorter and quicker
Merv

Back to Software Forum
4 total posts (Page 1 of 1)  

Software Forums