Results 1 to 15 of 15

Macro search for number with variable steps

Threaded View

  1. #1
    Registered User
    Join Date
    04-08-2009
    Location
    London, England
    MS-Off Ver
    Excel 2000
    Posts
    8

    Macro search for number with variable steps

    I have an excel spreadsheet that I am trying to format. Each time the spreadsheet is of the same format but with differing amount of numbers. I.e. sometimes it will be a set of 3, the next time might be 6.
    I want to write a macro that will find a set piece of text, move it offset(-1,2) and then find the next one.
    For example....

    | Column |
    |MF1 |
    |MF2 |
    . |
    . |
    . |
    |MFn |

    The text to search for is MF1, then MF2 until it does not find it.

    So I thought it out something like (in non VB code!):
    Find MF1, Select
    Selection.Cut
    ActiveCell.Offset(-1, 2).Select
    ActiveSheet.Paste
    Find MF2, Select
    etc.
    Until Can't find next MFn.

    Cheers in advance.
    Cei
    Last edited by mudraker; 04-17-2009 at 07:56 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