+ Reply to Thread
Results 1 to 11 of 11

If Then Write Text

  1. #1
    Registered User
    Join Date
    07-29-2014
    Location
    New York
    MS-Off Ver
    2007
    Posts
    33

    If Then Write Text

    Hi,

    I would like to solve the following problem:

    If you find the word "baby" in column a, then place the phrase "baby shoes" in column b

    where the terms "baby" and "baby shoes" can be altered as needed.

    For example, where the following would also work

    If you find "boston" in column a, place "Boston Red Sox" in column b

    Thank you

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,944

    Re: If Then Write Text

    Prepare a list for
    List
    SI Old Word New Word
    1 Baby Baby Shoe
    2 Boston Boston Red Sox

    Then use vlookup function
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: If Then Write Text

    Hi,

    Please open the attached example and see if it suits your requirement.
    Attached Files Attached Files
    Last edited by cbatrody; 07-30-2014 at 01:22 AM.

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: If Then Write Text

    What you are asking for can be achieved with the formula something like this......

    Please Login or Register  to view this content.
    Is this what you are trying to achieve?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  5. #5
    Registered User
    Join Date
    07-29-2014
    Location
    New York
    MS-Off Ver
    2007
    Posts
    33

    Re: If Then Write Text

    Thank you all for your response.

    Nfsales - I tried vlookup and did not really know what went where when the pop up appeared, I tried entering various things, but nothing seemed correct
    Chatrody - I downloaded example but did not see how to change the terms if I'd like to enter different character strings, like "chocolate chip cookies"
    Sktneer - I tried this and in each case the response was the same, "No baby found in col A, despite the fact that baby was there

    Thank you so much for your help everyone and your tremendous responsiveness.

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: If Then Write Text

    The formula suggested above will work if the cells in col. A contain a single word "baby" not a string which contains "baby" in it. If the cells contain a string which may have baby in it, rather you try this.......

    Please Login or Register  to view this content.
    If this is not what you are trying to achieve, better upload a sample workbook.

  7. #7
    Registered User
    Join Date
    07-29-2014
    Location
    New York
    MS-Off Ver
    2007
    Posts
    33

    Re: If Then Write Text

    Hi Sktneer,

    Thanks for your help. I prepared a sample for you but I cannot see where to post attachments to upload to you. As you probably can tell, I am a newbie. I read the instructions, but still do not see the "browse" button that they refer to, to upload from.

    But again, no matter what I put in column a, the same response appears in column b, in this instance, "baby shoes," appears in column b, whether baby is in column a or not

  8. #8
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: If Then Write Text

    Please see columns highlighted in yellow (F1 to G2)
    Attached Files Attached Files
    Last edited by cbatrody; 07-30-2014 at 02:46 AM.

  9. #9
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: If Then Write Text

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  10. #10
    Registered User
    Join Date
    07-29-2014
    Location
    New York
    MS-Off Ver
    2007
    Posts
    33

    Re: If Then Write Text

    I was able to get Chatrody's version to work for me. Very much appreciated.

    Nfsales - thank you
    Chatrody - thank you
    Sktneer - thank you

  11. #11
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: If Then Write Text

    You're welcome. Glad that your issue has been resolved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 12-30-2011, 06:22 PM
  2. write text into the cells from text box
    By nixon.sk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-25-2011, 02:06 PM
  3. Copy cell value, add additonal text and write to Text file
    By emwhite in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2011, 09:47 PM
  4. Text qualifier " created when using I/O to write a text file
    By PingPing in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2010, 04:52 AM
  5. Write Text File
    By Nigel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-31-2005, 01:11 PM

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