+ Reply to Thread
Results 1 to 3 of 3

scanning and looping columns

  1. #1
    Registered User
    Join Date
    01-10-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2003
    Posts
    51

    scanning and looping columns

    So I need help making this loop. I need to insert a column after a pair of columns, and put this function in the adjacent cells.

    Please Login or Register  to view this content.
    After that, if a cells value in that inserted column is 2, i want the two cells before the active one and the date in column A to be copied and pasted into the summary worksheet. Then the inserted column needs to be deleted, and another one placed after the next pair of columns, and so on until the last column. I know this is a lot to ask, so I've posted example files to work with. It's greatly reduced from what I'm actually working with to keep stuff confidential, but it should get the job done.
    Attached Files Attached Files
    I can't always post examples of what I might be asking about due to confidentiality issues, but I WILL try to explain my problems as thoroughly as I can.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: scanning and looping columns

    try this:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-10-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: scanning and looping columns

    Jbeaucaire, thanks so much for the reply! I just saw it today, and your code works, but only after a certain point in my full range of data. I'm just going to work with it for a while and see if I can get the output right, but for some reason it pulls in the same set of data for about 900 rows, and when it finishes that, it just prints out the column it is at, not the values it found which match the criteria.

+ 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