+ Reply to Thread
Results 1 to 5 of 5

How to select multiple different cells that contains specific text

  1. #1
    Registered User
    Join Date
    04-09-2018
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    21

    How to select multiple different cells that contains specific text

    I am new to Excel VBA and i really need some guidance.

    I need to go row by row through "Sheet1" selecting one row at a time, check if the value in Column C is correct (value = selected), if it is, then copy the "selected" (Cell B) and (Cell E) that contains the word (selected)then copy - paste to "Sheet2" using MACRO

    The result will be something like
    Before
    PPTED5QC PQC701 selected QCPC 10.143.20.209
    PPTED5QC PQC702 selected QCPC 10.143.20.225
    PPTED5QC PQC703 selected QCPC 10.143.20.241
    PPTED5QC PQC704 selected QCPC 10.143.21.1
    PPTED5QC PQC705 selected QCPC 10.143.21.17

    After
    PQC701
    10.143.20.209

    PQC702
    10.143.20.225

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: How to select multiple different cells that contains specific text

    Hi,

    Here's a suggestion, assuming data starts in Cell1 of sheet1. Simply add the macro in a module and run it.
    Change the sheet name if required.

    Please Login or Register  to view this content.
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: How to select multiple different cells that contains specific text

    Please Login or Register  to view this content.
    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 Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: How to select multiple different cells that contains specific text

    Try this code
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: How to select multiple different cells that contains specific text

    Using advanced filter
    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. Highlight Specific text in multiple cells
    By skjaved in forum Excel General
    Replies: 3
    Last Post: 01-17-2017, 06:21 AM
  2. Find Specific Text in Multiple Cells
    By jrbrugger in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 06-07-2015, 10:14 PM
  3. [SOLVED] Replacing specific text in multiple cells
    By nobodyNZ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-13-2014, 11:19 AM
  4. If statement for specific text in multiple cells
    By adcohen88 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-18-2014, 07:38 PM
  5. Replies: 3
    Last Post: 12-12-2013, 12:27 PM
  6. [SOLVED] COUNTIF search range of cells for multiple specific text.
    By JasonNeedsHelp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2013, 06:38 PM
  7. Replies: 1
    Last Post: 01-25-2013, 12:44 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