+ Reply to Thread
Results 1 to 2 of 2

Some sort of a For Each loop??

  1. #1
    Registered User
    Join Date
    04-25-2005
    Posts
    99

    Some sort of a For Each loop??

    I have a column that contains various strings. Example:
    Sales
    Price
    Figures
    Trade
    New
    Old

    I want to do some sort of procedure that finds all the variations in this column. For example, say the above is my data for this month, then it would create six string variables (one for each: "Sales", "Price", etc..).

    If my data next month was:
    Sales
    New
    Old
    Then it would create three string variables ("Sales", "New", "Old"). What I eventually want to do is take all the variations, and copy the rows to their own worksheet (take all "Sales" from my master sheet and move to a newly created "Sales" sheet). I think I can accomplish this second part, if I can find a way to figure out all the variations to start with.

    I'm not sure If I can explain this in a better or more clear way, but if you need more explanation, I can try.

    TIA for all help!

    DejaVu

  2. #2
    Tom Ogilvy
    Guest

    Re: Some sort of a For Each loop??

    Go to Ron de Bruin's site. He has already written the macro to do the
    copying:

    http://www.rondebruin.nl/tips.htm

    --
    Regards,
    Tom Ogilvy

    "DejaVu" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I have a column that contains various strings. Example:
    > Sales
    > Price
    > Figures
    > Trade
    > New
    > Old
    >
    > I want to do some sort of procedure that finds all the variations in
    > this column. For example, say the above is my data for this month,
    > then it would create six string variables (one for each: "Sales",
    > "Price", etc..).
    >
    > If my data next month was:
    > Sales
    > New
    > Old
    > Then it would create three string variables ("Sales", "New", "Old").
    > What I eventually want to do is take all the variations, and copy the
    > rows to their own worksheet (take all "Sales" from my master sheet and
    > move to a newly created "Sales" sheet). I think I can accomplish this
    > second part, if I can find a way to figure out all the variations to
    > start with.
    >
    > I'm not sure If I can explain this in a better or more clear way, but
    > if you need more explanation, I can try.
    >
    > TIA for all help!
    >
    > DejaVu
    >
    >
    > --
    > DejaVu
    > ------------------------------------------------------------------------
    > DejaVu's Profile:

    http://www.excelforum.com/member.php...o&userid=22629
    > View this thread: http://www.excelforum.com/showthread...hreadid=386238
    >




+ 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