View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Kassie Kassie is offline
external usenet poster
 
Posts: 17
Default logic problem: help needed

Hi David

Thanks for the feedback! I appreciate your problem, don't get me wrong.
Allow me some time to play around with what you have given me, and I'll come
back. I am however not very hopefull that I will be able to solve it with a
macro. What I have used, is a simple formula to add the number of D's per
column and per row, which of course makes it a lot easier to work with. I
used =COUNTIF(B1:B51,"D") for the columns and =COUNTIF(A2:AC2,"D") for the
rows. The problem with a macro is that while it will insert D's in 2's and
3's, and even consider the 5 fixed "D"'s, it will not consider the overall
pattern you try to maintain. Bu as I said, let me play around with it, and
see what I can come up with.

--
ve_2nd_at. Randburg, Gauteng, South Africa


"dcleave" wrote:


Hi,
Thanks for your reply:

This is all getting off the point, but allow me to clarify things. The
problem that I set is actually a gross simplification of the actual
situation. The workplace I run is a busy intensive care unit in the UK.
There are 70 staff working a mixture of day & night shifts (12hr
shifts), with occasional management & study days thrown in. Most work
13 shifts in 28 days, but some work less. The are many different grades
of staff, which all has to be taken into account. The trouble with a
fixed rota pattern is that it although it is easy to write, it tends to
discriminate against women with children, or people who have partners
who work irregular hours. We like to offer a degree of flexible working
so that our staff with childcare comittments (the majority) can have an
element of choice/flexibility. This does mean that the rota is a
nightmare to write. It used to be done by hand on a huge sheet of
paper, and take about 4 days to complete. errors were common. I moved
it to excel, and it now takes me one full day. All the adding up of
staff numbers etc are automated, but I still feel that Excel has more
to offer.

To get back to the point:

The solution to the following problem would be a huge help to me:

How do I get the 'D's in a row to cluster in the way I want (2's &
3's), whilst still maintaining the same number in each column?

I would hope to extrapolate the solution to this problem to other
problems.

David


--
dcleave
------------------------------------------------------------------------
dcleave's Profile:
http://www.excelforum.com/member.php...o&userid=20562
View this thread: http://www.excelforum.com/showthread...hreadid=393767