+ Reply to Thread
Results 1 to 6 of 6

Numbers not recognized as such

  1. #1
    Registered User
    Join Date
    10-01-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2013
    Posts
    7

    Numbers not recognized as such

    Hello

    Here is my macro.. It processes data from a .csv imported.
    I managed to get the data I need from one sheet to the other. Now I would like to eliminate some rows (where the value of the transaction is positive).
    However, it looks like the values in the range "transactions" (and thus cell) are not recognized as numbers.
    Checking if they are positive (cell >= 0) gives a type error, and indeed it the "IsNumeric" gives a false (and the TypeName gives back a variant).
    The numbers are formatted something like -123,45, but I also tried using plain integers (1, 10, 100) and they are still not recognized as numeric.

    What is the problem?

    Please Login or Register  to view this content.
    Last edited by d_abbatelli; 07-01-2014 at 08:53 AM.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Numbers not recognized as such

    You may have blanks or other non-visible characters in the cells. This first step is to see what you have. Pick a cell and run:

    Please Login or Register  to view this content.
    Gary's Student

  3. #3
    Registered User
    Join Date
    10-01-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Numbers not recognized as such

    Quote Originally Posted by Jakobshavn View Post
    You may have blanks or other non-visible characters in the cells. This first step is to see what you have. Pick a cell and run:

    Please Login or Register  to view this content.
    Here is what I got, on a cell which contains only "10"

    Please Login or Register  to view this content.
    On a cell that contains -178,3:

    Please Login or Register  to view this content.
    Doesn't seem to be any extra character...

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Numbers not recognized as such

    try
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Numbers not recognized as such

    You could try this code.

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Registered User
    Join Date
    10-01-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Numbers not recognized as such

    Quote Originally Posted by mikerickson View Post
    try
    Please Login or Register  to view this content.
    This worked!

    Thanks!

+ 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. Replies: 7
    Last Post: 07-10-2013, 09:45 PM
  2. [SOLVED] Numbers in cells not recognized when using InputBox to copy and paste rows
    By Nikolette in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-25-2013, 07:09 PM
  3. Data from Access to Excel (numbers not recognized)
    By excelcool in forum Excel General
    Replies: 0
    Last Post: 02-02-2011, 05:06 PM
  4. Value not recognized as value
    By Roadie in forum Excel General
    Replies: 2
    Last Post: 04-20-2005, 02:54 AM
  5. [SOLVED] Decimal numbers not recognized as numbers
    By Stein Kristiansen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-13-2005, 06:06 PM

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