+ Reply to Thread
Results 1 to 3 of 3

Text comparison problem

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    Inverness
    MS-Off Ver
    Excel 2003
    Posts
    14

    Text comparison problem

    I know this is a very basic query, but I just can't figure it out! The following forumula doesn't recognise kg, even when the cell contains kg. Cell D87 is formatted for text (I have also tried other formats to no avail).

    =IF(ISBLANK(E87),"",IF($D87="kg",(O87*0.93),IF($E87=1,P87,O87)))

    Thank you!

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Text comparison problem

    Is there any blank space before or after "kg"?
    Try this,
    =IF(ISBLANK(E87),"",IF(ISNUMBER(SEARCH("kg",D87)),(O87*0.93),IF($E87=1,P87,O87)))
    Quang PT

  3. #3
    Registered User
    Join Date
    01-25-2013
    Location
    Inverness
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Text comparison problem

    Thank you - the 'isnumber' formula works.

    I wonder why my original formula didn't work - I tried various combinations of " kg", "kg ", etc.!

+ 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