Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Re-posted need more detail

I have been advised that this would be easier done in code than formulas, could someone please elaborate for me.

Folks

Could someone tell me if I can do this without code or not.

What I want to do is have a list of dates across row 1, say every tues and
thurs in a month but continiuing across 1 sheet per month. Now I want to
mark attendances in to row 2 for that person so it may be A2 is "A", B2 is
"A" etc.. and have a monthly percentage and some form of ongoing percentage,
but when I put in a value of say "E" for exam instead an "A" the percentage
starts from zero again. The basic concept is that I keep a running tally of
whether the person can be examined or not based on their attendance and once
they have been examined, start the count and percentage again.
Therefore if a person has over 85% attendance they can be examined or a
count of 12 nights. Once they are examined the count and percentage rate
would start again until they reach the same equivalent for their next exam.

All help is greatly appreciated, all examples of code or formulas to kick me
off more than welcome.

Regards

Gav !!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Re-posted need more detail

You don't say where the 'result goes.

Lest say that column A is the person's name, B is the
result and C... the days.
For each row, start at the right most cell and count
the 'A's until you get to an 'E' . Place the result in B
Set conditional formatting to make the background ob 'B'
go green say for when an exam is possible.

Code is simplistic - email me directly for working sample

Patrick Molloy
Microsoft Excel MVP


-----Original Message-----
I have been advised that this would be easier done in

code than formulas, could someone please elaborate for me.

Folks

Could someone tell me if I can do this without code or

not.

What I want to do is have a list of dates across row 1,

say every tues and
thurs in a month but continiuing across 1 sheet per

month. Now I want to
mark attendances in to row 2 for that person so it may

be A2 is "A", B2 is
"A" etc.. and have a monthly percentage and some form of

ongoing percentage,
but when I put in a value of say "E" for exam instead

an "A" the percentage
starts from zero again. The basic concept is that I keep

a running tally of
whether the person can be examined or not based on their

attendance and once
they have been examined, start the count and percentage

again.
Therefore if a person has over 85% attendance they can

be examined or a
count of 12 nights. Once they are examined the count and

percentage rate
would start again until they reach the same equivalent

for their next exam.

All help is greatly appreciated, all examples of code or

formulas to kick me
off more than welcome.

Regards

Gav !!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Re-posted need more detail

Sometimes the easier solutions are harder to spot.

column A is name. columns C - IV are date columns where
values may A,E or whatever.
We need to count, starting from the right-most column and
moving left all the 'A' values until we hit an E

Here's a FUNCTION that does just that:

Public Function Attendance(ThisRow As Long) As Long
Dim cl As Long
Dim count As Long
With ActiveSheet
cl = .Cells(ThisRow, "IV").End(xlToLeft).Column

Do While cl 2

If .Cells(ThisRow, cl).Value = "A" Then
count = count + 1
ElseIf .Cells(ThisRow, cl).Value = "E" Then
Exit Do
End If

cl = cl - 1

Loop

End With

Attendance = count

End Function


add this to a standard module.
All you do is pass the row number.

so in the example, suppose A2 is John, in B2 put
=Attenance(Row())

This passes the current row to the function, which counts
the A's

Patrick Molloy
Microsft Excel MVP

demo workbook available on request





-----Original Message-----
You don't say where the 'result goes.

Lest say that column A is the person's name, B is the
result and C... the days.
For each row, start at the right most cell and count
the 'A's until you get to an 'E' . Place the result in B
Set conditional formatting to make the background ob 'B'
go green say for when an exam is possible.

Code is simplistic - email me directly for working sample

Patrick Molloy
Microsoft Excel MVP


-----Original Message-----
I have been advised that this would be easier done in

code than formulas, could someone please elaborate for

me.

Folks

Could someone tell me if I can do this without code or

not.

What I want to do is have a list of dates across row 1,

say every tues and
thurs in a month but continiuing across 1 sheet per

month. Now I want to
mark attendances in to row 2 for that person so it may

be A2 is "A", B2 is
"A" etc.. and have a monthly percentage and some form

of
ongoing percentage,
but when I put in a value of say "E" for exam instead

an "A" the percentage
starts from zero again. The basic concept is that I

keep
a running tally of
whether the person can be examined or not based on

their
attendance and once
they have been examined, start the count and percentage

again.
Therefore if a person has over 85% attendance they can

be examined or a
count of 12 nights. Once they are examined the count

and
percentage rate
would start again until they reach the same equivalent

for their next exam.

All help is greatly appreciated, all examples of code

or
formulas to kick me
off more than welcome.

Regards

Gav !!


.

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
Question not posted? Simon New Users to Excel 4 May 5th 10 05:50 PM
Why my posting are not posted! LABKHAND Excel Discussion (Misc queries) 5 January 22nd 10 02:01 AM
Posts not showing up - posted through OE T. Valko Excel Worksheet Functions 5 November 5th 09 02:13 AM
I need a eqivalent for function posted here ytayta555 Excel Discussion (Misc queries) 1 April 10th 08 08:15 PM
Hi ..I posted some more info ..... ANDREW_B Excel Discussion (Misc queries) 1 December 2nd 04 04:08 PM


All times are GMT +1. The time now is 03:34 AM.

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"