Consulting

Results 1 to 5 of 5

Thread: Solved: Counting different values

  1. #1
    VBAX Contributor
    Joined
    Apr 2006
    Posts
    100
    Location

    Solved: Counting different values

    I hope I can explain this correctly. I was able to count number of test in a FY year. I need to now the number of systems per FY year. IF a system is test more then one in a year it is only count a one system for that year.

    I started the code on the workbook attach.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I would just use formulae

    For 2004,

    =COUNTIF(Updated!B:B,">="&MIN(2000+ROW(A3))&"/10/01")
    -COUNTIF(Updated!B:B,">="&MIN(2000+ROW(A3)+1)&"/10/01")

    and

    =SUM(--(FREQUENCY(IF((Updated!B2:B1000>=DATE(2000+ROW(A3),10,1))*(Updated!B2:B1000 <DATE(2000+ROW(A3)+1,10,1)),
    MATCH(Updated!A2:A1000,Updated!A2:A1000,0)),ROW(INDIRECT("1:"&ROWS(Updated! A2:A1000))))>0))

    the second is an array formula, just copy the 2 formulae down for 2005, etc.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Contributor
    Joined
    Apr 2006
    Posts
    100
    Location
    The formula for FY04 return 2 but that that from the same system in that year. So the number of system should be 1.

    For FY05 I am getting #value in the cell.

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    .
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Contributor
    Joined
    Apr 2006
    Posts
    100
    Location
    Thanks for the help.

Posting Permissions

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