+ Reply to Thread
Results 1 to 12 of 12

If cell contains text, copy text from another cell over a range of cells

  1. #1
    Registered User
    Join Date
    05-22-2014
    Posts
    23

    If cell contains text, copy text from another cell over a range of cells

    Hi All,

    Here is what I am trying to do.

    I have a list of text quotes in column A. I then have column B which will have a Y entered if the quote is used in a presentation. I currently have around 100 quotes.

    On a separate sheet, I want to be able to effectively say in one cell - If column B has text in it, copy the quote from column A. But the difficult part is how do I make this happen so that I can have multiple quotes being pulled into one cell?

    I have tried concatenation, but I am struggling.

    Would really appreciate your help guys,

    Thanks so much

  2. #2
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: If cell contains text, copy text from another cell over a range of cells

    hi

    can you share sample file??

    Cheers!!

  3. #3
    Registered User
    Join Date
    05-22-2014
    Posts
    23

    Re: If cell contains text, copy text from another cell over a range of cells

    Hi - thanks Elliot - I have attached the file
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Thumbs up Re: If cell contains text, copy text from another cell over a range of cells

    Hi

    Check this attachment, it can be done thru macro..

    Cheers!!
    Attached Files Attached Files
    Last edited by excelliot; 05-22-2014 at 11:18 AM.

  5. #5
    Registered User
    Join Date
    05-22-2014
    Posts
    23

    Re: If cell contains text, copy text from another cell over a range of cells

    That is so awesome! Thank you so so much! Can I simply change the formula for it to work in other sheets?

  6. #6
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325
    Yes you can.. but you need to copy macro also..

  7. #7
    Registered User
    Join Date
    05-22-2014
    Posts
    23

    Re: If cell contains text, copy text from another cell over a range of cells

    Thanks Elliot. I have now tried to do this by opening up the VBA and copy and pasting your code into the sheet I am working in. Should this work if I have also altered the cell values that you entered on the test sheet? I have attached a screen shot. Thank you so so much for your help.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: If cell contains text, copy text from another cell over a range of cells

    Hi you need to put code in separate module, you can insert module by pressing Alt + F11 when you are in excel workbook, then select Insert & then module...

    Paste your code & its done.. I was thinking to make a new function to suit your need, will give you that soon to make it more dynamic...


    Cheers!!

  9. #9
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Thumbs up Re: If cell contains text, copy text from another cell over a range of cells

    Use below code:

    Syntex is =xlJoin("Y",Range,n)

    here Y is character which you are matching, Your range is like "A3:B7", where Col A contains proverb & Col B contains "Y", n is distance no. of column away from proverb column, in this case it is 2.

    Please Login or Register  to view this content.
    Also refer attachment..

    Cheers!!
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    05-22-2014
    Posts
    23

    Re: If cell contains text, copy text from another cell over a range of cells

    Hi Elliot,

    Thanks so much for your help. I'm having difficulty in using the Macro's, so I have attached a file with three sheets in. I have explained what I would like to happen in each sheet and I would really appreciate your help if you can work these our for me.

    Thank you so so much!
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: If cell contains text, copy text from another cell over a range of cells

    Check this...

    Cheers!!
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    05-22-2014
    Posts
    23

    Re: If cell contains text, copy text from another cell over a range of cells

    Thanks so much elliot - sheet 5 works great and concatinates exactly as I need, but unfortunately sheet 4 comes up with 'VALUE' when you put a Y in other field in that column. Unfortuantely sheet 6 does also not have code in, as I don't think I made this clear in my last post. Thanks so much!

+ 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. Copy a Cell Range That is a Text in a Cell
    By JDling in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2014, 10:31 AM
  2. Formula to identify part of a text in cell from range of cells & insert adjacent cell text
    By Novicebutnotforlong in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-19-2013, 02:11 AM
  3. Replies: 3
    Last Post: 08-16-2012, 03:25 PM
  4. Replies: 7
    Last Post: 07-04-2006, 03:20 AM
  5. Replies: 2
    Last Post: 12-18-2005, 02:20 AM

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