+ Reply to Thread
Results 1 to 4 of 4

formula works when referring to one cell but not to another

  1. #1
    Nicci
    Guest

    formula works when referring to one cell but not to another

    I'm sure there is a simple explanation but I can't come up with it. The
    following is the formula I am using:
    =IF(OR(X2="roll not cut",X2="cut not roll"),"OK to process", " ")

    Basically, I am using this with a spreadsheet I receive from another user.
    I am just trying to automatically mark anything that says 'roll not cut' or
    'cut not roll' as 'OK to process' leaving any other comments showing as a
    blank (to be researched by me later)

    This formula works fine if I use it to reference another cell that I
    personally type in so I know that the formula itself is ok. It must be
    something with the data I am receiving. I've tried copying the cells into a
    new column as values only but that isn't changing the result. I've tried
    changing the format from general to text but that isn't working. The only
    way that I can get this data to work is to clear the contents of the cell and
    copy in the retyped data from another cell (retyping alone doesn't work
    either) but that defeats the purpose. Any help will be greatly appreciated.

  2. #2
    Forum Contributor
    Join Date
    11-29-2005
    Posts
    142
    Perhaps there are extra spaces in the downloaded data:

    Try:

    =IF(OR(TRIM(X2)="roll not cut",TRIM(X2)="cut not roll"),"OK to process", "")

  3. #3
    Stefi
    Guest

    Re: formula works when referring to one cell but not to another

    Another possible reason, that the received data are not of Excel text format.
    Try =TEXT(A1,"@") (A1 being the original data).

    Regards,
    Stefi

    „Vito” ezt *rta:

    >
    > Perhaps there are extra spaces in the downloaded data:
    >
    > Try:
    >
    > =IF(OR(TRIM(X2)="roll not cut",TRIM(X2)="cut not roll"),"OK to
    > process", "")
    >
    >
    > --
    > Vito
    > ------------------------------------------------------------------------
    > Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
    > View this thread: http://www.excelforum.com/showthread...hreadid=558883
    >
    >


  4. #4
    Nicci
    Guest

    Re: formula works when referring to one cell but not to another

    This worked. Thanks so much.

    "Vito" wrote:

    >
    > Perhaps there are extra spaces in the downloaded data:
    >
    > Try:
    >
    > =IF(OR(TRIM(X2)="roll not cut",TRIM(X2)="cut not roll"),"OK to
    > process", "")
    >
    >
    > --
    > Vito
    > ------------------------------------------------------------------------
    > Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
    > View this thread: http://www.excelforum.com/showthread...hreadid=558883
    >
    >


+ 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