+ Reply to Thread
Results 1 to 7 of 7

VBA Code to select cells that have the word "Pediatrics" in it

  1. #1
    Registered User
    Join Date
    01-29-2014
    Location
    St. Louis, MO
    MS-Off Ver
    Excel 2010
    Posts
    28

    VBA Code to select cells that have the word "Pediatrics" in it

    Hi guys,

    I was hoping that you fine gentlepeople could help with a VBA code that selects values from cells that have the word "pediatrics" in it. For example, assume you have the following three cells in column A:

    Family Oncology Group
    Daily Pediatrics Clinic
    Touch Pediatrics

    I would like it if in column B it had:

    -
    Daily Pediatrics Clinic
    Touch Pediatrics

    So basically it would act like an if-statement that draws values with the phrase "pediatrics" in it. Hope my request is clear and thank you for your help in advance!

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: VBA Code to select cells that have the word "Pediatrics" in it

    Why not filter on column B for pediatrics?
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Code to select cells that have the word "Pediatrics" in it

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Devon, England
    MS-Off Ver
    Excel 2003
    Posts
    128

    Re: VBA Code to select cells that have the word "Pediatrics" in it

    John,
    would it be possible to include an input box where the range to be searched and the word to search for could be input?

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Code to select cells that have the word "Pediatrics" in it

    Yes, maybe?

    Please Login or Register  to view this content.
    Last edited by JOHN H. DAVIS; 03-11-2015 at 06:42 AM.

  6. #6
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Devon, England
    MS-Off Ver
    Excel 2003
    Posts
    128

    Re: VBA Code to select cells that have the word "Pediatrics" in it

    Thank you John, that works for me.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Code to select cells that have the word "Pediatrics" in it

    You're welcome Nick, but in the future please comply with the Forum Rules and start a new thread. Review Rule No. 2 below.

    http://www.excelforum.com/forum-rule...rum-rules.html

+ 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: 5
    Last Post: 01-23-2014, 11:02 AM
  2. [SOLVED] Formula Needed to fill multiple cells with "No" when the word "No" is entered into a cell
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-09-2013, 05:36 PM
  3. Excel VBA Code to make my Toggle Buttons output "Yes" or "No" to their cells
    By mebanet in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2013, 06:14 AM
  4. [SOLVED] Select the cells directly below all cells that contain the word "Course"
    By upjumped_iackanapes in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-11-2012, 07:31 PM
  5. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 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