+ Reply to Thread
Results 1 to 5 of 5

Cell has added text to data, need to be blank if no data.

  1. #1
    Registered User
    Join Date
    04-15-2013
    Location
    RUSSIA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Question Cell has added text to data, need to be blank if no data.

    I have a cell that shows data from 2 cells in another sheet. In that cell I have it showing the words Port and then data from C1 and then a - and then the data from F1.

    Here's the formula:

    ="Port "&'Sheet 4'!C1 &"-"&'Sheet 4'!F1


    If the cells in C1 and F1 are blank, it just shows: Port - ....I want it to display nothing if both of those cells are blank.

    Also, if possible, I would like it to just display the port number from F1 with no - if C1 is blank.

    Thanks in advance!!

  2. #2
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Cell has added text to data, need to be blank if no data.

    Hello,

    You can add an isblank formula before yours.
    So it might be like this:
    =IF(AND(ISBLANK(C1),ISBLANK(F1)),"",IF(ISBLANK(C1),"Port "&'Sheet 4'!F1,"Port "&'Sheet 4'!C1-""&'Sheet 4'!F1))

    Hope this help.
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  3. #3
    Registered User
    Join Date
    04-15-2013
    Location
    RUSSIA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Cell has added text to data, need to be blank if no data.

    For some reason this isn't showing anything in the cell when I enter it in. Let me remind you the data is coming from Sheet 4, ....So shouldn't all the instances of C1 and F1 have 'Sheet 4' in front of it? I am a complete novice with formulas!

  4. #4
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Cell has added text to data, need to be blank if no data.

    Yes, you are right, it's my bad
    The formula should look like this
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-15-2013
    Location
    RUSSIA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Cell has added text to data, need to be blank if no data.

    For some reason that still didn't quite work, it would show the #VALUE in the cell. But I had a friend help me with it and he said it just needed to be shortened to this....

    Please Login or Register  to view this content.
    Thanks again for your help!

+ 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