View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Aaron Howe[_2_] Aaron Howe[_2_] is offline
external usenet poster
 
Posts: 23
Default Counting accummilation of hours??

A quick way of doing it would be:

=IF(COUNTIF(Hols1,"Bloggs J"),COUNTIF(Hols1,"Bloggs
J")+8,IF(COUNTIF(Hols2,"Bloggs J"),COUNTIF(Hols1,"Bloggs J")+12,0))

Thereby using a nested IF statement. However, bear in mind that ADDS 8 to
the count, so where J Bloggs appears in Hols1 (Cells 1 to 20), you will have
that one count *and* an additional 8 - therefore a count of 9 overall. Also,
to do this you would have to split the two ranges into different names. This
was just a quick resolution, I'm sure one of the guys here will have a far
more graceful way of achieving what you are looking for.

HTH

"Simon Lloyd" wrote:


Hi all,

I have a workbook that currently has a count up sheet for an instance
of certain text in a named range, it counts when people have been
booked off work, my problem is that rather than booking days off in the
future they will be booking either an 8 hour day in one period or a 12
our day in another and have a total 0f 128 hours to book off. I want to
be able to count the amount of hours on my count up sheet for text found
in the source sheet, so if "Bloggs J" appears in named range "Hols" and
is in between cells A1:A20 then its 8 added to the count up but if it
appears in named range "Hols" between cells A20:A30 it adds 12 to the
count up!?

I can mail you my current workbook so you can see how it all works at
the moment.

Any thoughts?

Simon

P.S i currently use =COUNTIF(Hols,"Bloggs J")


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=390844