+ Reply to Thread
Results 1 to 12 of 12

Need Help in copying a text/sentence from a column to another ..

  1. #1
    Registered User
    Join Date
    05-25-2011
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    21

    Need Help in copying a text/sentence from a column to another ..

    Hi !


    I Need Help in copying a text/sentence from one column to another ..

    I have six column A/B/C/D/E/F

    SAMPLE file you can download from below link :

    http://www.2shared.com/file/JPTA06RS/help2sort.html

    Image File :

    http://www.2shared.com/photo/CPi3Jbty/sder.html


    Problem :


    I want to copy the content / sentence from column F to A

    Only when

    Column B-value is equal to Column E value

    Suppose Column B22 (value ) is equal to Column E15 Value , I want to copy the corresponding F15 content / sentence to Column A22

    Similarly,

    Suppose Column B23 (value ) is equal to Column E15 Value , I want to copy the corresponding F15 content / sentence to Column A23

    and so on ...



    I'll be very thankful to you guys if you can help me out with this Problem !


    Many Thanks in Advance !


    Regards

    Mike

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Need Help in copying a text/sentence from a column to another ..

    I can't open the links you've posted, but I think in column A you probably want something like:

    =IF(ISNA(MATCH(B2,E:E,0)),"",INDEX(F:F,MATCH(B2,E:E,0)))

  3. #3
    Registered User
    Join Date
    05-25-2011
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Need Help in copying a text/sentence from a column to another ..

    Hi Andrew !

    It works .. Many Thanks !

    Now I have another issue ! will be great if you can help me out with this one !

    I want to copy the content / sentence from column A to E

    Only when

    Column C-value is equal to Column C value

    Suppose Column C22 (value – it can be anything no or text) is equal to Column C22 Value , I want to copy the corresponding A22 content / sentence to Column E22 as 1. A22 content <br>

    Similarly,

    Suppose Column C22 (value ) is equal to Column C23 Value , I want to copy the corresponding A23 content / sentence to Column E22 as 1. A22 content <br> 2. A23 content

    Without losing the already copied cotent from A22 - I want to add serial no 1 , 2, 3 the </br> is html tag

    and so on ...

    For example ,
    Lets say C22 to C27 contents the same content , I want to copy all the content from A22 to A27 to E22 as 1. A22 content <br> 2. A23 content </br>3. A24 content <br> 4. A25 content </br> 5. A26 content <br> 6. A27 content </br>

    After copying the content from A22 to A27 to E22 , I want to delete all the rows – A23 to a27 leaving only A22 and all the contents in E22.

    Is this possible , Will be very thankful to you if you can kindly solve this problem !

    Once again Many Thanks !




    I'll be very thankful to you guys if you can help me out with this Problem !


    Many Thanks in Advance !


    Regards

    Mike

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Need Help in copying a text/sentence from a column to another ..

    Mike,

    What you're asking for couldn't be done with formula, you'd need a VB macro - would this be OK?

    Also, I don't really understand:

    Suppose Column C22 (value – it can be anything no or text) is equal to Column C22 Value
    C22 will, surely, always equal C22.

  5. #5
    Registered User
    Join Date
    05-25-2011
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Need Help in copying a text/sentence from a column to another ..

    First C22 compare with C22 , if its equal copy the content from A22 to E22 as 1. A22 content <br>

    Now again compare C22 with C23 , if its equal copy the content from A23 to E22 as 1. A22 content <br>2. A23 content </br> (To keep on adding the content from A column)

    so on......

    I have in column C22 to C 27 the word (Channel) C 28 has the word (channel_bass)

    Now compare C22 with C28 , if its equal copy the content from A28 to E22 as 1. A22 content <br> 2. A23 content </br>3. A24 content <br> 4. A25 content </br> 5. A26 content <br> 6. A27 content </br> 7. A28 content </br>

    But since C22 (channel ) is not equal to C28 (channel_bass ) , now i want to delete all the copied rows i.e: From A23 to A27 Leaving only A22 !

    After deleting the rows , now C23 will have the word (channel_bass ) , I want to repete the same process as above !



    VB macro is also fine as long as i get the result !

    thanks

  6. #6
    Registered User
    Join Date
    05-25-2011
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Need Help in copying a text/sentence from a column to another ..

    Yes you are right , C22 will always be equal to C22 ,

    After first comparison , increment C22+1 and compare C22 with C23

    an so on !

  7. #7
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Need Help in copying a text/sentence from a column to another ..

    Could you possibly post an example workbook? I know you had one in your first post, but I couldn't get that fileshare thing to work for me. It would be easier if you clicked on the "Go advanced" button and used the paper-clip icon to attach a file to your post.

  8. #8
    Registered User
    Join Date
    05-25-2011
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Need Help in copying a text/sentence from a column to another ..

    Plz find the attached sample file!

    I have inserted the desire result in E22


    Bookss.xlsx

  9. #9
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Need Help in copying a text/sentence from a column to another ..

    Give this macro a go. I *think* it's what you're after.

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    05-25-2011
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Need Help in copying a text/sentence from a column to another ..

    Almost ....

    But this is not deleting the rows whose content is already copied !

    And also , the copied content on the Column E is not correct !

    Can you please download this simple files with lesser contents!

    problem845.xlsx (8.4 KB)

    After running the Macro , i want the result as below !

    problem845-result.xlsx (8.3 KB)


    thanks !
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Need Help in copying a text/sentence from a column to another ..

    Ah, I missed the requirement to delete rows, and misunderstood which column you were looking for matches in.

    Try this updated code:

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    05-25-2011
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Need Help in copying a text/sentence from a column to another ..

    It works Andrew !


    You are a Genius ...God of Excel !



    Many thanks ! I'll get back to you later if i have any problem while running the macro !


    Thanks Once Again !

+ 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