+ Reply to Thread
Results 1 to 13 of 13

'COUNTIF' Function is not preventing '#N/A'

Hybrid View

  1. #1
    Registered User
    Join Date
    06-30-2007
    Posts
    51

    'COUNTIF' Function is not preventing '#N/A'

    I am using the following COUNTIF formula which I am sure is supposed to prevent '#N/A' from appearing (According to http://www.ozgrid.com/Excel/stop-na-vlookup.htm)

    =IF(COUNTIF(B10,PORT),"",INDEX(Ports!$A$3:$BD$54,MATCH(Jun08!C10,PORT,0),MATCH(Jun08!D10,Ports!$A$2:$BD$2,1)))
    However, #N/A is still appearing in the worksheet when no data has been input.

    As this is something we are going to be presenting to a client, I am keen to ensure it doesn't contain #N/A all over it!

    Thanks in anticipation
    Last edited by VBA Noob; 06-05-2008 at 08:51 AM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Quote Originally Posted by carlosbourn
    I am using the following COUNTIF formula which I am sure is supposed to prevent '#N/A' from appearing (According to http://www.ozgrid.com/Excel/stop-na-vlookup.htm)

    =IF(COUNTIF(B10,PORT),"",INDEX(Ports!$A$3:$BD$54,MATCH(Jun08!C10,PORT,0),MATCH(Jun08!D10,Ports!$A$2:$BD$2,1)))
    However, #N/A is still appearing in the worksheet when no data has been input.

    As this is something we are going to be presenting to a client, I am keen to ensure it doesn't contain #N/A all over it!

    Thanks in anticipation
    I don't really understand the first part
    B10 seems to be the range you test, is PORT the test criteria?

  3. #3
    Registered User
    Join Date
    06-30-2007
    Posts
    51
    Correct - B10 is the range & PORT is the criteria

    (arthurbr - this is based almost entirely on a forumula you helped me with a month or so ago!)

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Quote Originally Posted by carlosbourn
    Correct - B10 is the range & PORT is the criteria

    (arthurbr - this is based almost entirely on a forumula you helped me with a month or so ago!)


    Thx for reminding me
    But I see thet PORT is also used as 2nd in your MATCH function where it should use an array??

  5. #5
    Registered User
    Join Date
    06-30-2007
    Posts
    51
    Hmm, I see what you mean but the formula seems to work absolutely fine and I think the formula you used in my sample last time was also set up like this - see below:

    =IF(COUNTIF(B2,port),"",INDEX(Ports!$A$3:$F$52,MATCH(Input!C2,port,0),MATCH(Input!D2,Ports!$A$2:$F$2,1)))

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Could you post your file?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. countif function
    By rubio in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-11-2008, 05:08 PM
  2. COUNTIF function using a drop down list source data as the criteria.
    By Stevie-B in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-07-2008, 08:22 AM
  3. Glitche in the Countif Function
    By calli in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 12-07-2007, 05:13 PM
  4. COUNTIF Function using more than one criterion
    By ary in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-19-2007, 05:14 AM
  5. Nesting a countif function
    By kevinr1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-20-2007, 09:57 AM

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