+ Reply to Thread
Results 1 to 108 of 108

Creating a nested COUNTIF????

  1. #1
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Creating a nested COUNTIF????

    Hi all, im trying to get my spreadsheet to count in one cell if certain criteria appear in two other cells, say for instance =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next named range and the number would be from -11 to 11.

    So in short i would like the value for "Hours" displayed in Bloggs J cell (which could be lets say E3) only if Bloggs J appears in the named range "Name"

    Hope that is clear and hope you can help!

    Simon

  2. #2
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  3. #3
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    At the moment i have the follwing in the cells, which is great and adds 1 for every instance it sees of the name in the Range "Name" but instead of counting in column B each instance of the name and adding 1 i need it to see the name Bloggs J in the "name" range and then look for the value on the same row in the range "Hours" this will then be totalled with the results from another sheet as you can see in column G.

    Any thoughts?

    Simon

    Column E

    Bloggs J

    Column F
    =COUNTIF(Name,"Bloggs J")

    Column G
    =SUM(F40,'Holiday Count'!K33)

  4. #4
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  5. #5
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    will mail you but it won't be until 6pm GMT

    Thanks,

    Simon

  6. #6
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  7. #7
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  8. #8
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  9. #9
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  10. #10
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  11. #11
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  12. #12
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  13. #13
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  14. #14
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  15. #15
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  16. #16
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  17. #17
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  18. #18
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  19. #19
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  20. #20
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  21. #21
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  22. #22
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  23. #23
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  24. #24
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  25. #25
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  26. #26
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  27. #27
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  28. #28
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  29. #29
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  30. #30
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  31. #31
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  32. #32
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  33. #33
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  34. #34
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  35. #35
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  36. #36
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  37. #37
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  38. #38
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  39. #39
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  40. #40
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  41. #41
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  42. #42
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  43. #43
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  44. #44
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  45. #45
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  46. #46
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  47. #47
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  48. #48
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  49. #49
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  50. #50
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  51. #51
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  52. #52
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  53. #53
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  54. #54
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  55. #55
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  56. #56
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  57. #57
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  58. #58
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  59. #59
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  60. #60
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  61. #61
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  62. #62
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  63. #63
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  64. #64
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  65. #65
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Max,

    Thanks, i've been working nights so took me a little time to work out what you had proposed and the automation works fine ( a lot smarter too!)......there was one thing i needed the workbook to do, that is when hours are added or deducted on the Xtra's sheet they need to be added or removed from the total on the Holiday Count sheet, i realise that this sort of creates a circular calculation which Excel doesn't like, so maybe i have steered you wrong in the first place as to the totalling system.

    The people that use this will at first glance at the holiday count to see if a person has any entitlement left then will use the Holidays sheet to book more hours, however the Xtra's sheet will be used if hours are given or taken for any other reason other than legitimate holidays so the total needs to be shown here too (perhaps its a strange concept to have the 2 totals but it needed to be shown for simplicity for the users).

    Hope this clears it up a little.............again thanks for all your help!

    Simon.

  66. #66
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  67. #67
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  68. #68
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  69. #69
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  70. #70
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  71. #71
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  72. #72
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  73. #73
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  74. #74
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  75. #75
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  76. #76
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  77. #77
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  78. #78
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  79. #79
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  80. #80
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  81. #81
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  82. #82
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  83. #83
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  84. #84
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  85. #85
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  86. #86
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  87. #87
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  88. #88
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  89. #89
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  90. #90
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  91. #91
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  92. #92
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  93. #93
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  94. #94
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  95. #95
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  96. #96
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  97. #97
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  98. #98
    Max
    Guest

    Re: Creating a nested COUNTIF????

    You're welcome, Simon !
    I'm out of further ideas here to offer you.

    Monitor your thread here awhile
    for possible insights from other folks
    Or you may wish to put in a new post ..

    All the best !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  99. #99
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  100. #100
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  101. #101
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  102. #102
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  103. #103
    Max
    Guest

    Re: Creating a nested COUNTIF????

    You're welcome, Simon !
    I'm out of further ideas here to offer you.

    Monitor your thread here awhile
    for possible insights from other folks
    Or you may wish to put in a new post ..

    All the best !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  104. #104
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Maybe you mean in E3:

    =SUMPRODUCT((Name="Bloggs J")*(Hours=10))

    which would return the count you're after in your line
    > =COUNTIF(Name,"Bloggs J" and Hours,= number)

    assuming the "Hours" number = 10
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all, im trying to get my spreadsheet to count in one cell if certain
    > criteria appear in two other cells, say for instance
    > =COUNTIF(Name,"Bloggs J" and Hours,= number) where hours is the next
    > named range and the number would be from -11 to 11.
    >
    > So in short i would like the value for "Hours" displayed in Bloggs J
    > cell (which could be lets say E3) only if Bloggs J appears in the named
    > range "Name"
    >
    > Hope that is clear and hope you can help!
    >
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:

    http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=401673
    >




  105. #105
    Max
    Guest

    Re: Creating a nested COUNTIF????

    If you'd like to, email over a copy of your file at:
    demechanik < at > yahoo <dot > com

    Think a look at your set-up would be clearer

    Drop me a note here if you're sending or not
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  106. #106
    Max
    Guest

    Re: Creating a nested COUNTIF????

    No prob ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  107. #107
    Max
    Guest

    Re: Creating a nested COUNTIF????

    Here's my best shot at it, Simon,
    after studying your detailed set-up and comments:

    In sheet: Xtra's & count
    ------------------------
    You have in F2:
    =COUNTIF(Name,"Atkinson M")

    Instead of hardcoding the names into the formula cell by cell,
    we could automate the revised version which includes summing
    the figures from the "Hours Given/Taken" col D
    by changing it in F2 to just:

    =SUMIF($A:$A,E2,$D:$D)

    (E2 contains the name: Atkinson M,
    E3 contains another name and so on, down col E.
    The structure is repeated in cols H, K & N)

    And you have in G2:
    =SUM(F2,'Holiday Count'!B5)

    but this formula in col G is not consistent down col G, as a
    random check down G3:G40 reveals the formula jumps about, e.g.:

    G3: =SUM(F3,'Holiday Count'!B4)
    G4: =SUM(F4,'Holiday Count'!B11)
    G7: =SUM(F7,'Holiday Count'!B43)
    G38: =SUM(F38,'Holiday Count'!H38)
    G40: =SUM(F40,'Holiday Count'!K33)

    The haphazard jumps were apparently to point to cells adjacent to the
    corresponding specific names located in "'Holiday Count"'s col E and had
    been painstakingly put together, cell by cell

    Here, think we could try to automate it by changing it in G2 to:

    =SUM(F2,IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$A:$B,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),IF(ISNA(VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),0,VLOOKUP(E2,'Holiday
    Count'!$J:$K,2,0)),VLOOKUP(E2,'Holiday
    Count'!$G:$H,2,0)),VLOOKUP(E2,'Holiday
    Count'!$D:$E,2,0)),VLOOKUP(E2,'Holiday Count'!$A:$B,2,0)))

    The 4 level nested IF(ISNA(VLOOKUP1(...),IF(ISNA(VLOOKUP2(...), ... )
    will automate the looking up of the names in col E against the 4 lists of
    names that you have set-up in sheet: Holiday Count, in cols A, D, G & J
    and return the number in the adjacent cols B, E, H & K where the name
    matches. This of course, presumes that all the names listed in sheet:
    Holiday Count are unique names (a scan shows this to be so). If there is no
    match found for the names, a zero will be returned

    Then just select F2:G2, fill down as far as required

    And to propagate the above likewise to
    the other similarly structured "pairs" of cols I & J, L & M, O & P

    Copy F2:G2, then do a paste special > Check "Formulas" > OK on I2
    This will copy the formulas in F2:G2 relatively into I2:J2,
    w/o impacting the formats, etc

    Then just select & fill I2:J2 down as far as the extent done for cols F & G

    And repeat the process for cols L & M, and cols O & P

    I will email to you the revised file later tonight
    (can't access to yahoo right now)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --

    Simon's cover note:

    As promised here is the workbook but a little late, you will see on the
    sheet Xtra's and Count that there are some cells that have names near
    them, column F looks for an instance of the name in column E in the named
    range and column called "Name", then column G looks at the total for the
    corresponding name on the Holiday Count sheet and adds the value from
    column F.

    This all works fine when counting single occurences but now i have
    added a column called "Hours Given/Taken" and the range is called
    "Hourlist", I want to be able to count up the hours from column D and put
    them in column F for the corresponding names i then want the value of this
    cell adding/subtracting from the corresponding name total on the Hloiday
    Count sheet and being displayed in column G on the Xtra's & count sheet.

    This sheet has list validation for coulumns A:D so its point and click (the
    people that use it dont like using computers so i designed it to be as
    simple as possible, on the Holidays sheet you just enter the persons
    index number press enter and the name appears from a look up sheet. NB i
    need to keep the N/A# as it helps me see if anyone has delete the formulas
    as protecting the sheets for the way it is used is a pain!), thee are
    other features ive built in but they shouldnt interfere.

    When the "log in" box pops up just enter <snipped> and it will allow you
    to proceed.



  108. #108
    Max
    Guest

    Re: Creating a nested COUNTIF????

    You're welcome, Simon !
    I'm out of further ideas here to offer you.

    Monitor your thread here awhile
    for possible insights from other folks
    Or you may wish to put in a new post ..

    All the best !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1