+ Reply to Thread
Results 1 to 3 of 3

Isnumber thrown off by rogue spaces

  1. #1
    Registered User
    Join Date
    06-22-2009
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    68

    Isnumber thrown off by rogue spaces

    I have a few formulas that use sumproduct and isnumber, which look like this:

    Please Login or Register  to view this content.
    They are all fairly similar. They basically look down column A and check that it's a number (date), then check the month of the date to check that it matches the given number (in this case 4, April), it then checks column C for the text "FL", etc. The end result is a single figure. I have about 15 of these on various pages in a workbook that look at different ranges.

    They work brilliantly and do exactly what I need, except that occasionally rogue spaces creep into columns A or B (the other columns are either formula results or data validation lists) which totally throw off Isnumber leaving me with #Value results.

    Is there anyway to adjust the formula above to ignore the spaces?

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Isnumber thrown off by rogue spaces

    Maybe try building in the TRIM()*1 feature into your formula..?
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Isnumber thrown off by rogue spaces

    If you restore Excel's default horizontal formatting ("General"), then text aligns left and numbers right, and you can tell at a glance when there's a problem, rather than adding Band-Aids in your formulas.
    Entia non sunt multiplicanda sine necessitate

+ 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