+ Reply to Thread
Results 1 to 16 of 16

#NUM! Error with Extracting Data Based on Criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    08-11-2008
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013 64-bit
    Posts
    57

    #NUM! Error with Extracting Data Based on Criteria

    I've been using a spreadsheet template which I found on YouTube to try and do a similar thing with my own workbook. http://www.youtube.com/watch?v=6bGKhbUYOas

    The problem is (see the screenshot at the bottom), on the far left column, the top row is fine, it is pulling in the data housed in another worksheet. However, when I drag it down to the other cells, it does not display any data, it shows a #NUM! error instead. There should be 84 records which match the criteria "Arsenal Aston Villa League". It is only displaying one of the results, with the subsequent rows displaying a #NUM! error.

    Here's the formula for the second cell of the far left column:

    46098048.jpg

    As you can see, the variable 'J17' changes +1 for each cell, yet only the top one works.

    Any help appreciated. Thanks.

    76165835.jpg
    Last edited by ACM2; 06-27-2012 at 11:04 AM.

  2. #2
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: #NUM! Error with Extracting Data Based on Criteria

    Hi There,

    We would not be able to examine or work on a jpg image.. Instead can you upload an example workbook?
    Thanks,

    Bonny Tycoon


  3. #3
    Registered User
    Join Date
    08-11-2008
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013 64-bit
    Posts
    57

    Re: #NUM! Error with Extracting Data Based on Criteria

    Yes, here is the example workbook.

    example.zip

  4. #4
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: #NUM! Error with Extracting Data Based on Criteria

    You need to confirm the formula using Ctrl+Shift+Enter and not just Enter.
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  5. #5
    Registered User
    Join Date
    08-11-2008
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013 64-bit
    Posts
    57

    Re: #NUM! Error with Extracting Data Based on Criteria

    Quote Originally Posted by Søren Larsen View Post
    You need to confirm the formula using Ctrl+Shift+Enter and not just Enter.
    That works, thanks.

  6. #6
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: #NUM! Error with Extracting Data Based on Criteria

    That's good!

  7. #7
    Registered User
    Join Date
    08-11-2008
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013 64-bit
    Posts
    57

    Re: #NUM! Error with Extracting Data Based on Criteria

    Just a minor thing which I'd like to fix. Currently, any extracted data coming from a blank cell will display "0". Now I know you can enter a "'" into that blank cell, but that isn't practical for so many. How can I adjust this formula so it will NOT display a 0 when the cell in the remote worksheet is blank?

    =IF(ROWS(G$21:G21)<=$A$11,INDEX(INDIRECT(G$18),SMALL(IF(Dep=$A$19,ROW(Dep)-ROW('Season Results History (Hidden)'!$DC$4)+1),ROWS(G$21:G21))),"")

  8. #8
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: #NUM! Error with Extracting Data Based on Criteria

    You probably have to do something like this:
    Formula: copy to clipboard
    =IF(ROWS(G$21:G21)<=$A$11,IF(INDEX(INDIRECT(G$18),SMALL(IF(Dep=$A$19,ROW(Dep)-ROW('Season Results History (Hidden)'!$DC$4)+1),ROWS(G$21:G21)))=0,"",INDEX(INDIRECT(G$18),SMALL(IF(Dep=$A$19,ROW(Dep)-ROW('Season Results History (Hidden)'!$DC$4)+1),ROWS(G$21:G21)))),"")

  9. #9
    Registered User
    Join Date
    08-11-2008
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013 64-bit
    Posts
    57

    Re: #NUM! Error with Extracting Data Based on Criteria

    Quote Originally Posted by Søren Larsen View Post
    You probably have to do something like this:
    Formula: copy to clipboard
    =IF(ROWS(G$21:G21)<=$A$11,IF(INDEX(INDIRECT(G$18),SMALL(IF(Dep=$A$19,ROW(Dep)-ROW('Season Results History (Hidden)'!$DC$4)+1),ROWS(G$21:G21)))=0,"",INDEX(INDIRECT(G$18),SMALL(IF(Dep=$A$19,ROW(Dep)-ROW('Season Results History (Hidden)'!$DC$4)+1),ROWS(G$21:G21)))),"")
    That works perfectly. Thank you!

    What I've been getting since I implemented the array formulas is a lot of lag when I change a drop down box, it takes 5-6 seconds for the table to change sometimes, stating "Calculating (4 processors) 1%". Is there a way of quickening things up?

  10. #10
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: #NUM! Error with Extracting Data Based on Criteria

    Yes, it's because of all the complex formulas. If you want to quicken things up your either need to adapt a new structure of your workbook, adapt a different approach to the formulas used or implemet macros to do the work instead. Perhaps you should change the workbook to something simpler and less dynamic.

  11. #11
    Registered User
    Join Date
    08-11-2008
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013 64-bit
    Posts
    57

    Re: #NUM! Error with Extracting Data Based on Criteria

    Quote Originally Posted by Søren Larsen View Post
    Yes, it's because of all the complex formulas. If you want to quicken things up your either need to adapt a new structure of your workbook, adapt a different approach to the formulas used or implemet macros to do the work instead. Perhaps you should change the workbook to something simpler and less dynamic.
    Would using named ranges instead of cell references help to any degree?

  12. #12
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: #NUM! Error with Extracting Data Based on Criteria

    No, I shouldn't think so.

  13. #13
    Registered User
    Join Date
    08-11-2008
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013 64-bit
    Posts
    57

    Re: #NUM! Error with Extracting Data Based on Criteria

    Quote Originally Posted by Søren Larsen View Post
    No, I shouldn't think so.
    I read on here that using Excel's database functions are quicker than using arrays, because arrays are only ideal for small data sets. Would using the DGET function be quicker?

  14. #14
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: #NUM! Error with Extracting Data Based on Criteria

    I took a look at your workbook, but I find it difficult to give any suggestions as long as you have all these ref/num errors. Do you have a working workbook we could see?

  15. #15
    Registered User
    Join Date
    08-11-2008
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013 64-bit
    Posts
    57

    Re: #NUM! Error with Extracting Data Based on Criteria

    Quote Originally Posted by Søren Larsen View Post
    I took a look at your workbook, but I find it difficult to give any suggestions as long as you have all these ref/num errors. Do you have a working workbook we could see?
    Yes, but as it is to be a commercial product, I don't wish to put the whole of the workbook on here (it is also 42MB in size). What I can do though is find another means of sending it to you.

  16. #16
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: #NUM! Error with Extracting Data Based on Criteria

    No, that won't be nescessary. The reason I asked was that when looking at your workbook, I couldn't see why it should be that slow. But if your attachment isn't the entire project, then that's probably the reason. I would suggest that you close this thread (mark it solved), and create a new thread where you address this new issue of changing your project into something based on a database. Sadly I'm no expert in this area, so I think you'll get better help if you start a new thread.

+ 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