+ Reply to Thread
Results 1 to 3 of 3

Now With Index -- IF Function Does Not Work With Cell Reference

  1. #1
    Gary
    Guest

    Now With Index -- IF Function Does Not Work With Cell Reference

    Actually I made a mistake. And it was not a space issue.

    A1 contains the following:

    =INDEX($D$1:$D$700,R15)

    and it returns the "<".

    If I use an IF function that says =IF(A1="<","Curly","Larry") I
    get Larry.

    How can I fix this so that when I reference Cell A1 I get Curly.


    Thanks,


    Gary


  2. #2
    Peo Sjoblom
    Guest

    Re: Now With Index -- IF Function Does Not Work With Cell Reference

    Still works for fine me, are you sure this won't work?

    =IF(TRIM(A1)="<","Curly","Larry")

    check the cell in D1:D700 and make sure it hasn't a hidden space, if you
    still get the error try this

    =ISNUMBER(MATCH("*"&CHAR(160)&"*",D1:D700,0))

    if you get TRUE you have html invisible line feed, than I'd suggest you run
    this macro on D1:D700

    http://www.mvps.org/dmcritchie/excel/join.htm#trimall

    --

    Regards,

    Peo Sjoblom

    Excel 95 - Excel 2007
    Northwest Excel Solutions
    www.nwexcelsolutions.com
    "It is a good thing to follow the first law of holes;
    if you are in one stop digging." Lord Healey


    "Gary" <gjn63669@aim.com> wrote in message
    news:1151263426.806390.58700@m73g2000cwd.googlegroups.com...
    > Actually I made a mistake. And it was not a space issue.
    >
    > A1 contains the following:
    >
    > =INDEX($D$1:$D$700,R15)
    >
    > and it returns the "<".
    >
    > If I use an IF function that says =IF(A1="<","Curly","Larry") I
    > get Larry.
    >
    > How can I fix this so that when I reference Cell A1 I get Curly.
    >
    >
    > Thanks,
    >
    >
    > Gary
    >




  3. #3
    Gary
    Guest

    Re: Now With Index -- IF Function Does Not Work With Cell Reference

    Thanks, Peo.

    Your macro worked. Now that I think of it the people I got the EXCEL
    file probably generated it by copying it from a WORD file.

    Gary

    Peo Sjoblom wrote:
    > Still works for fine me, are you sure this won't work?
    >
    > =IF(TRIM(A1)="<","Curly","Larry")
    >
    > check the cell in D1:D700 and make sure it hasn't a hidden space, if you
    > still get the error try this
    >
    > =ISNUMBER(MATCH("*"&CHAR(160)&"*",D1:D700,0))
    >
    > if you get TRUE you have html invisible line feed, than I'd suggest you run
    > this macro on D1:D700
    >
    > http://www.mvps.org/dmcritchie/excel/join.htm#trimall
    >
    > --
    >
    > Regards,
    >
    > Peo Sjoblom
    >
    > Excel 95 - Excel 2007
    > Northwest Excel Solutions
    > www.nwexcelsolutions.com
    > "It is a good thing to follow the first law of holes;
    > if you are in one stop digging." Lord Healey
    >



+ 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