+ Reply to Thread
Results 1 to 3 of 3

Find anything that start with PH and copy it underneath

  1. #1
    Registered User
    Join Date
    02-12-2019
    Location
    Denmark
    MS-Off Ver
    14.0.7228.5001
    Posts
    2

    Find anything that start with PH and copy it underneath

    Hi,
    I'm pretty new at VBA coding but started because I wanted to make my life a little bit easier. I have been trying for a while now to find a way to look through Column B to look for anything that starts "PH" and duplicate/copy it underneath but I keeps getting stuck the on coping after finding the word. I hope some of you have some tips to get it to work and thank you very much in advance for any tips.

    Hopefully, it's enough to info but else I'm in the comments.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    31,284

    Re: Find anything that start with PH and copy it underneath

    Easiest way would be to switch on AutoFilter and use a Text filter on column B to select cells that "begin with" PH. Select the visible cells, copy them and paste them below the existing data. Record a macro while you do it.

    It will need tweaking to make it more efficient and to generalise the selection of the row after the data bu that's easy enough to do when you have the basic code.
    Trevor Shuttleworth - Excel Aid

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    02-12-2019
    Location
    Denmark
    MS-Off Ver
    14.0.7228.5001
    Posts
    2

    Re: Find anything that start with PH and copy it underneath

    Thank you very much for the tip and it works to some extent for me but the reason why I'm looking for the code to place the copied underneath the other is so its still in alphabetical order. It can't be sorted afterward because of the numbers afterward in my data because it will then sort it like this (PH.1, Ph.11, Ph.12, Ph.2, Ph.3,) and not in whole numbers like this (PH.1, Ph.2, Ph.3, Ph.11, Ph.12,)

+ 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. VBA macro to find specific text, then copy into a new WB data underneath such text
    By tempforVBA in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-01-2018, 09:31 AM
  2. Is it possible to copy live data to row underneath and insert new row every few seconds?
    By lfreeman4511 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-19-2017, 01:32 PM
  3. Where to start? Search pivot, find value, validate, copy/paste
    By rsamedic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2017, 04:06 PM
  4. Replies: 2
    Last Post: 03-05-2013, 07:52 AM
  5. [SOLVED] Copy text files underneath each other
    By ditöle in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-05-2013, 07:28 AM
  6. Copy & Paste a row underneath the last one in the table
    By BouncingHippo in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 01-28-2008, 08:30 PM
  7. macro to copy a column and put it underneath another
    By cadalist in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-28-2007, 06:59 PM

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