LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Asking for better logic to avoid multiple if's.

I have been trying to find a better method to loop through the data
than a series of if statements. What I am trying to do is go down a
list of employees and determine which preference they were able to fit
into and subtract that from a set value..

If we started with 1 in each time frame from 6:00AM to 2:00PM in two
hour increments the following data would end up as listed below.

Name Full/Part Rank 1 2 3 4 5
Student A Full 1 8:00 AM 10:00 AM 6:00 AM 12:00 PM 2:00 PM
Student B Full 2 6:00 AM 8:00 AM 10:00 AM 12:00 PM 2:00 PM
Student C Full 4 6:00 AM 8:00 AM 10:00 AM 12:00 PM 2:00 PM
Student D Full 5 6:00 AM 8:00 AM 10:00 AM 12:00 PM 2:00 PM
Student E Full 6 12:00 PM 10:00 AM 8:00 AM 6:00 AM 2:00 PM

Assigned
Student A 8:00 AM - First preference and a slot available so it's
filled.
Student B 6:00 AM - First preference and a slot available so it's
filled.
Student C 10:00 AM - First two preference are already completed
filled so 3rd is used.
Student D 12:00 PM - First three preferences are already filled so
4th is used.
Student E 2:00 PM - First four preferences are already filled so
5th is used.

On the full list there are a varying number of slots available in each
time slot. What I was beginning to do so far was loop across checking
each slot for availability then moving on to the next one if there was
none or subtracting one and going to the next employee. I could
continue this way but it would end up being close to 25-30 if
statements and I'm just asking if there is better logic to use here
than that. Any ideas would be appreciated.

Excel 2003 is the version being used.

Thanks!

 
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
Multiple IF's with an OR Nadine Excel Worksheet Functions 5 June 4th 10 05:37 PM
How 2 avoid multiple IF's by LOOKUP's??? FARAZ QURESHI Excel Discussion (Misc queries) 3 June 8th 07 09:01 AM
How to avoid multiple IF's by LOOKUP's? FARAZ QURESHI Excel Discussion (Misc queries) 2 June 8th 07 05:15 AM
Multiple IF's to Select a Value JerryS Excel Worksheet Functions 6 May 9th 07 12:53 AM
multiple IF's ? foilprint0 Excel Worksheet Functions 1 January 31st 06 04:59 PM


All times are GMT +1. The time now is 06:39 AM.

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"