+ Reply to Thread
Results 1 to 4 of 4

Array function returns #NUM! result

  1. #1
    Registered User
    Join Date
    04-17-2008
    Posts
    3

    Array function returns #NUM! result

    I'm using an array function to calculate the 95-percentile of a data. I have a number of data values per hour, and I have a cell in each row that truncates the timestamp of a result down to the hour.

    My array function is {=PERCENTILE(IF($A2=DS!$AM:$AM,DS!$T:$T,FALSE),0.95)}, where column A2 is the key (the hour in question), DS!AM contains the truncated timestamp, and DS!T contains the values that I want to determine the 95-percentile of.

    I've used this method quite successfully in a number spreadsheets, but I have one spreadsheet that returns some #NUM! error for some hourly values. I can see no reason why some hours work and not others. Comparisons between keys and truncated timestamps are ok, and the number of data values (12) is the same from one hour to the next.

    Any clues?

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Array function returns #NUM! result

    Pre 2007 you can't use whole column references like AM:AM or T:T

  3. #3
    Registered User
    Join Date
    04-17-2008
    Posts
    3

    Re: Array function returns #NUM! result

    Thanks. However this is with 2007.

    Tony

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Array function returns #NUM! result

    What does =COUNTIF(DS!AM:AM,A2) return ?
    If 0 you will get a #NUM error in your Percentile array.

    Note: although entire column references are permitted in 2007 I would still advise against using them, performance will be affected given magnitude of range... it may be you have that many records (I'd hope not) -- better to use as small a range as is feasible.

+ 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