+ Reply to Thread
Results 1 to 3 of 3

If there's not an ampersand, I want cell to be empty - it gives me #VALUE! instead

Hybrid View

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

    If there's not an ampersand, I want cell to be empty - it gives me #VALUE! instead

    Hey all,

    This is pretty much complete. The only issue I'm having is that if there's not ampersand, then just make the cell empty. Rather, it gives me VALUE error:
    =LEFT(A1,IF(ISERROR(FIND("&",A1,1)),"",FIND("&",A1,1)-1))
    It doesn't like "" for some reason. Any other way to make the cell empty?

    For example, this is what column A1 may have:
    AVERNA,ROBERT C

    Because no ampersand, it should just return empty space in whatever column the calculation is performed in.

    Thanks for response.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: If there's not an ampersand, I want cell to be empty - it gives me #VALUE! instea

    Test the & first

    =IF(ISERR(FIND("&",A1,1)),"",LEFT(A1,FIND("&",A1,1)-1))
    or given use of XL2007

    =IFERROR(LEFT(A1,FIND("&",A1,1)-1),"")

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

    Re: If there's not an ampersand, I want cell to be empty - it gives me #VALUE! instea

    wow thanks for the quick reply. It worked.

+ 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.6.0 RC 1