+ Reply to Thread
Results 1 to 11 of 11

Take text from one cell if the other is empty

  1. #1
    Registered User
    Join Date
    11-21-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Take text from one cell if the other is empty

    I need to have a formula which will look in one cell and if there is something in, copy the text.

    So if A1 has text in it, copy it to C1, but if no text then take the value from B1 and insert into C1.

    Is this possible?

    B

  2. #2
    Registered User
    Join Date
    04-17-2012
    Location
    No, Thanks
    MS-Off Ver
    MS 2010
    Posts
    14

    Re: Take text from one cell if the other is empty

    Insert this into C1:

    =IF(A1<>"",A1,B1)

  3. #3
    Registered User
    Join Date
    11-21-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Take text from one cell if the other is empty

    Thank you so much!!

  4. #4
    Registered User
    Join Date
    11-21-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Take text from one cell if the other is empty

    How do I hide the 0, if there's nothing in either cell?

  5. #5
    Registered User
    Join Date
    04-17-2012
    Location
    No, Thanks
    MS-Off Ver
    MS 2010
    Posts
    14

    Re: Take text from one cell if the other is empty

    No problem. Try this:

    =IF(IF(A1<>"",A1,B1)=0,"",IF(A1<>"",A1,B1))

  6. #6
    Registered User
    Join Date
    11-21-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Take text from one cell if the other is empty

    Thanks! Is it possible for a cell to have a value entered into it, and if it doesn't default to the formula used?

  7. #7
    Registered User
    Join Date
    04-17-2012
    Location
    No, Thanks
    MS-Off Ver
    MS 2010
    Posts
    14

    Re: Take text from one cell if the other is empty

    Not in the same cell, but you can "stage gate" it. Have a column in between that you can enter data into (column C) and then have the formula in column D. For example:

    =IF(IF(C1<>"",(IF(A1<>"",A1,B1),C1)=0,"",IF(C1<>"",(IF(A1<>"",A1,B1),C1))

    This checks if you manually entered anything into C. If you did, it just uses that. If C is blank, then it checks A and B like before.

  8. #8
    Registered User
    Join Date
    11-21-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Take text from one cell if the other is empty

    Hi,

    It's coming up with a message that says "Your formula is missing a parenthesis--) or (.

  9. #9
    Registered User
    Join Date
    04-17-2012
    Location
    No, Thanks
    MS-Off Ver
    MS 2010
    Posts
    14

    Re: Take text from one cell if the other is empty

    Sorry, that's my fault - that's what I get for typing that freehand and not testing in a worksheet.

    =IF(IF(C1<>"",C1,IF(A1<>"",A1,B1))=0,"",IF(C1<>"",C1,IF(A1<>"",A1,B1)))

  10. #10
    Registered User
    Join Date
    11-21-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Take text from one cell if the other is empty

    Thank you so much for your help!

  11. #11
    Registered User
    Join Date
    04-17-2012
    Location
    No, Thanks
    MS-Off Ver
    MS 2010
    Posts
    14

    Re: Take text from one cell if the other is empty

    No worries.

+ 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