Results 1 to 8 of 8

Complicated Excel VBA Macro with Loop

Threaded View

  1. #1
    Registered User
    Join Date
    09-02-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Complicated Excel VBA Macro with Loop

    Hi all.

    I require help with a reasonably complicated VBA macro loop for a dataset I've been provided. The dataset exists as one long column one thousands of different entries.

    I've tried recording macros but I am at a loss at the best way to approach it. Any help would be greatly appreciated. In its simplest terms, I need to locate a term (ie. "THIS IS A TEST"), copy that cell into new worksheet, go 72 cells up and copy whatever is in that cell into the new worksheet as well.

    Logic for the VBA macro Loop...

    1. Scan through all worksheets for the words "THIS IS A TEST"
    2. Copy that cell into a new worksheet (eg. A1)
    3. Go 72 cells up
    4. Copy that cell into the new worksheet (eg. B1)

    It needs to loop through the above logic across all open worksheets, dumping the results into a new worksheet. Here is an example with 3 results..

    --------------------------------------------
    A...........................|B.............
    --------------------------------------------
    THIS IS A TEST X....|BLERG... <------the cell 72 up from "THIS IS A TEST X"
    --------------------------------------------
    THIS IS A TEST 2....|BLER2.... <------the cell 72 up from "THIS IS A TEST 2"
    --------------------------------------------
    THIS IS A TEST 1....|BLEfff...... <------the cell 72 up from "THIS IS A TEST 1"
    --------------------------------------------


    Once again, thanks for any help I recieve.
    Last edited by Samoski; 09-02-2010 at 02:01 AM.

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