+ Reply to Thread
Results 1 to 3 of 3

VBA Find A Value in Column A, Copy That Row and One Below and Paste into New Columns

  1. #1
    Registered User
    Join Date
    05-23-2011
    Location
    KCMO
    MS-Off Ver
    Excel 2007
    Posts
    8

    VBA Find A Value in Column A, Copy That Row and One Below and Paste into New Columns

    Hi,

    I have a sheet containing several thousand values all within column A. I want to sort through the information, find every instance where a value begins with "7021", copy that cell and the next one below it and paste them into column B and C respectively. Then, loop through the rest of the column to find all the occurrances.

    A sample of the data looks like this:

    7021-2000-001-01 BOM Unit
    3A03-0103-102-00 03-103/39
    79121009 WEB A
    7021-2000-002-01 BOM Unit
    3A03-0060-102-01 03-60/42, FP
    7021-2000-002-02 BOM Unit
    3A03-0058-136-00 03-58/22
    79121009 WEB B
    7021-2000-002-03 BOM Unit
    3A03-0048-102-00 03-48/31
    79121009 WEB C
    7021-2000-002-04 BOM Unit
    3A03-0055-102-00 03-55/32
    79121009 WEB D
    3A03-0055-102-00 03-55/32
    799121009 WEB:CTN 1IN W


    And, what I am hoping to see would be this:
    Column AColumn B
    7021-2000-001-01 BOM Unit 3A03-0103-102-00 03-103/39
    7021-2000-002-01 BOM Unit3A03-0060-102-01 03-60/42, FP
    7021-2000-002-02 BOM Unit 3A03-0058-136-00 03-58/22
    7021-2000-002-03 BOM Unit 3A03-0048-102-00 03-48/31
    7021-2000-002-04 BOM Unit 3A03-0055-102-00 03-55/32

    Thanks in advance for your help!

    -mlb723

  2. #2
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: VBA Find A Value in Column A, Copy That Row and One Below and Paste into New Columns

    Please Login or Register  to view this content.
    Post responsibly. Search for excelforum.com

  3. #3
    Registered User
    Join Date
    05-23-2011
    Location
    KCMO
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: VBA Find A Value in Column A, Copy That Row and One Below and Paste into New Columns

    Thank you very very much! This macro works beautifully. I really appreciate your help.

+ 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