+ Reply to Thread
Results 1 to 8 of 8

If statements: Non-numerical characters returning false when true

  1. #1
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    If statements: Non-numerical characters returning false when true

    I have a formula in column A of the following sheet. The problem is that when the entry in cell H contains a letter as well as a number then the formula in column a returns 0.

    Also if the value for false in the forumula is changed from 0 i.e to 1 or 2, then a value is returned in column A (this is shown in the red highlighted cells).

    AssetRegexample.xls

    Does anyone have any idea why this is?
    Last edited by JONNY981; 06-24-2009 at 10:29 AM. Reason: SOLVED

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If statements: Non-numerical characters returning false when true

    Are you actually trying to sum the numbers in column H or just return the asset number in column H when the the item in column I equals B and D equals K?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: If statements: Non-numerical characters returning false when true

    No not trying to sum the numbers, just want it to return the asset number from column H.

    Thanks.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If statements: Non-numerical characters returning false when true

    Then are you looking for:

    =IF(AND(B2=I2,D2=K2),H2,"")

    copied down.

  5. #5
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: If statements: Non-numerical characters returning false when true

    Thanks, but I need it to work for an array, i.e the formula needs to look through all of the data in columns I and K because the entries will not always necessarily be lined up correctly. The right hand columns are just for reference. Is it possible to do what I need to? Hopefully this makes sense!

    Thanks.

  6. #6
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: If statements: Non-numerical characters returning false when true

    Meant to upload this example file too, that first example didnt really show properly what I meant. This one shows how the data could be in columns H:K
    Attached Files Attached Files

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If statements: Non-numerical characters returning false when true

    Try then:

    =INDEX($H$2:$H$300,MATCH(1,INDEX(($I$2:$I$300=B2)*($K$2:$K$300=D2),0),0))

    copied down.

    Adjusting ranges to suit.

  8. #8
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: If statements: Non-numerical characters returning false when true

    Works great, thanks a lot!!

+ 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