+ Reply to Thread
Results 1 to 23 of 23

VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

  1. #1
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    VBA: Need help with two macros
    1. Search Word Chrome and Copy its data in A18. Chome merged cell range in column A will be considered chrome data in column B. And need the output in a single cell is B18
    2. Search Word Mozilla and copy and paste its data (B to E) in A20. Mozilla: merged cell range in column A will be considered Mozilla: data in column B to E. And need the copied output in a cell is B20 (column A to D)

    Example input and output data appears in attached excel file. Hope its clear now.
    Attached Files Attached Files
    Last edited by sroysroy; 10-18-2015 at 05:53 PM.

  2. #2
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    It must be easy !

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    Suggest you be more specific in your request. I have no idea what you want to happen. A clear explanation is always helpful. You have not provided any details to help understand your issue. Your attached worksheet is just as baffling.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    example Input and output is there in attached excel sheet.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    Sorry, but your worksheet makes no sense to me. Perhaps a detailed explanation as I flunked mind reading.

  6. #6
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    Now alansidman!

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    @Alan

    I've looked at the Thread 3-4 times today...have to admit, each time I looked I received no additional insight.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  8. #8
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    based on what the outputs are on your example

    Please Login or Register  to view this content.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  9. #9
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    Thanks humdingaling. It worked on only Sheet 3 and not in sheet 1 and 2

  10. #10
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    oh
    that's bizarre i programmed the thing solely based on sheet 1 but now i know what you mean by search for word

    ok give me a sec ill be back with your new code

  11. #11
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    the two words chrome and mozilla may or may not exist in sheets ! so both words should be considered for search to be found by VBA code !

  12. #12
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    Chrome and mozilla can appear any where in row !

  13. #13
    Forum Contributor tax112's Avatar
    Join Date
    02-28-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2016 | 2019
    Posts
    442

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    Quote Originally Posted by sroysroy View Post
    Thanks humdingaling. It worked on only Sheet 3 and not in sheet 1 and 2
    VBA Code for the right result.It's okay?
    To run properly with Sheet3 Code, you replace B3 = B4 in Code

  14. #14
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    see below code with find to look for where Chrome and Mozilla starts

    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    Thank you very much humdingaling.

  16. #16
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    I want to run the code in all sheets of excel workbook humdingaling except in "sheet X" and "sheet Y". Thanks in advance.
    first I put mozilla first its not working sir. The code is bit slow.
    Last edited by sroysroy; 10-19-2015 at 06:58 PM.

  17. #17
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    create a loop for the sheets

    Please Login or Register  to view this content.
    i dont know what you mean but put mozilla first?

  18. #18
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    For example when I have interchanged sheet1 search term mozilla data (8A:13E) above chome data 3A: 7E it is working partially only. Thats the problem I am talking about.

  19. #19
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    THIS LINE IS GIVING PROBLEM: For k = rng.Row To rng.End(xlDown).Row - 1

  20. #20
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    works fine for me
    see attached


    you arent changing the structure are you?
    Attached Files Attached Files

  21. #21
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    Many many thanks !

  22. #22
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    HUMDINGALING chrome is coping below cells as well upto the blank cells. because below keyword chome there is other data. and it is coping that aswell.

  23. #23
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: VBA: Search Word Chrome and Mozilla, Copy, Merge Cells and Paste.

    you really should explain the "real" scenario on your first post instead of adding extra things to add into your code
    i've changed the code to work on your mergedcells instead of CTRL Down method


    Please Login or Register  to view this content.

+ 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: 04-29-2014, 10:06 AM
  2. [SOLVED] Macro for opening hyperlinks present in excel sheet in Mozilla or Chrome.
    By pari9485 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2013, 06:21 PM
  3. Export sheets copy/paste Values And Formats with merge cells
    By creusemeninge in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-30-2013, 09:55 AM
  4. Replies: 1
    Last Post: 01-16-2013, 05:36 AM
  5. Search for value, copy/paste cells next to it
    By steveohh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2011, 02:20 AM
  6. Copy/paste cells to word header from excel
    By scifo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-19-2010, 03:24 AM

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