+ Reply to Thread
Results 1 to 2 of 2

#VALUE error

  1. #1
    Registered User
    Join Date
    10-01-2009
    Location
    Texas
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1

    Question #VALUE error

    Greetings,

    I have the following function which seems to run fine when I enter the calculated cell that calls the function and hit enter, however, if I do not enter the cell, I get the notorius #VALUE error, a value used in the formula is of the wrong data type. I basically have a table with 3 colums, Column A is the current date, Column B is a tracking number which consists of eight numerals and one alpha character, and column C is just a true or false. from a cell in column D i have entered =CountUniqueValues(a2:a501), which should give me the total number of unique dates, then in another cell in column D I have =CountUniqueValues(b2:b501), which should return the total number of unique tracking numbers entered. The calculation on column A works fine, but it gives me the #VALUE for Column B. Column A is formatted as DATE and Column B is formatted as TEXT.

    Below is my function.

    Please Login or Register  to view this content.

    Any help would be greatly appreciated.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: #VALUE error

    Hello johnnylaww,

    Welcome to the Forum!

    The Collection object requires that the Key (the second argument) be a String. Here are the corrections...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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