+ Reply to Thread
Results 1 to 4 of 4

Search a range, move data in pairs to a single column

  1. #1
    Registered User
    Join Date
    07-26-2011
    Location
    Richmond, Virginia
    MS-Off Ver
    Excel 2007
    Posts
    10

    Red face Search a range, move data in pairs to a single column

    Hello forumers,

    I was wondering if anything can help me with a script to accomplish the following. I have a data set with the following: columns A through G are static data, as well as column R through U. The range I am working with is columns H through Q. Essentially, i want to search my range and move any data that is not already in column H or I. Then copy the static data that support it. I guess this is called transposing...from rows into a column. Hopefully my before.xls and after.xls examples illustrate my goal.

    Thank you for taking the time to look and offer help,

    wherbjr35
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Search a range, move data in pairs to a single column

    try this:
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor gjlindn's Avatar
    Join Date
    08-01-2011
    Location
    Dodgeville, WI
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    369

    Smile Re: Search a range, move data in pairs to a single column

    This code assumes a few things: 1) All periods are filled in at the time you want to transpose the data for a particular row 2) You insert a column for showing the period 1 through 5 just to the left of the column you call Q1 and 3) you remove extra columns no longer used.
    Please Login or Register  to view this content.
    I've attached my example as well.
    Good luck!

    -Greg
    Attached Files Attached Files

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Search a range, move data in pairs to a single column

    Perhaps

    Please Login or Register  to view this content.
    Attached Files Attached Files
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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