Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default math wizard needed.


Very nice. I think I am going to go with this technique. I have notice
that in some cases it doesn't add up (try 3, 7, 11, or 15 students wit
4 periods) but I can modify it.

I am also going to "deal" the numbers to an array to speed things u
rather than do it on the sheet, but I owe the technique to you!

Thanks very much.

Kevin

Gary''s Student Wrote:
Hi Ronald:

Could a croupier technique be used? Deal out students two at a tim
until
they are completed distributed:

Sub dealer()

Application.ScreenUpdating = False
students = Cells(1, 1).Value
classes = Cells(2, 1).Value
pairs = Round(students / 2, 0)
check = students - pairs * 2

If check 0.5 Then
extra = 1
Else
extra = 0
End If

Columns("B:B").Select
Selection.Clear

j = 1
For i = 1 To pairs
Cells(j, 2).Value = Cells(j, 2).Value + 2
j = j + 1
If j classes Then
j = 1
End If
Next

Cells(j, 2).Value = Cells(j, 2).Value + extra
Application.ScreenUpdating = True
End Sub

--
Gary''s Student

TE


--
kevindmorga
-----------------------------------------------------------------------
kevindmorgan's Profile: http://www.excelforum.com/member.php...fo&userid=3223
View this thread: http://www.excelforum.com/showthread.php?threadid=53345

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
Math help Nadine Excel Worksheet Functions 3 May 10th 10 07:45 PM
math DeAnna Ramirez Excel Worksheet Functions 2 June 7th 07 11:42 PM
Allow the use of the fx wizard within the fx wizard for nesting Ron Excel Worksheet Functions 1 October 2nd 05 08:58 PM
Nested If/Then Math Expert Needed Steven Excel Worksheet Functions 1 January 5th 05 09:52 PM
Repost: XL2000 Template Wizard - help needed to update database Dick Kusleika Excel Programming 2 September 5th 03 03:52 PM


All times are GMT +1. The time now is 11:44 PM.

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"