ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Some sort of a For Each loop?? (https://www.excelbanter.com/excel-programming/334205-some-sort-each-loop.html)

DejaVu[_40_]

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 i
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 th
rows to their own worksheet (take all "Sales" from my master sheet an
move to a newly created "Sales" sheet). I think I can accomplish thi
second part, if I can find a way to figure out all the variations t
start with.

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

TIA for all help!

DejaV

--
DejaV
-----------------------------------------------------------------------
DejaVu's Profile: http://www.excelforum.com/member.php...fo&userid=2262
View this thread: http://www.excelforum.com/showthread.php?threadid=38623


Tom Ogilvy

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" wrote in
message ...

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





All times are GMT +1. The time now is 02:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com