+ Reply to Thread
Results 1 to 2 of 2

Thread: if statement returns #VALUE! if false

  1. #1
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    136

    if statement returns #VALUE! if false

    Hey all,

    Rather than returning #VALUE! if the if statement is false, I just want to return the contents of the cell. This is what I have:

    =IF(RIGHT(A8,FIND("&",A8))<>"",REPLACE(A8,FIND("&",A8),1,""),A8)

    This is the contents of a cell that returns #VALUE1:

    Detroit Sales Office

    This works correctly:

    Detroit Sales & Engineering Office

    Thanks for any response

  2. #2
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007, 2010
    Posts
    25,772

    Re: if statement returns #VALUE! if false

    Welcome to the forum.

    Maybe =TRIM(SUBSTITUTE(A8, "&", ""))
    Microsoft MVP - Excel
    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)

Tags for this Thread

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.2.0