Thread: Array usage
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
brocklanders[_2_] brocklanders[_2_] is offline
external usenet poster
 
Posts: 1
Default Array usage


lexcel

Some further explanation.

I have 1 worksheet and only columns A and B contain data. The data in
column A is store numbers and column B is territory number. Store
number is a unique value so there are no duplicates. Territory number
does have duplicates. Currently. when I run a macro I created, the
sheet is sorted by Territory number. Then, all store numbers
corresponding to that terrritory number are copied and saved into a new
workbook and the workbook is saved as the territory number.xls. See
below for example.
Store Territory
1 101
2 101
3 101
4 101
5 102
6 103
7 105
8 105
Notice stores 1-4 have the same territory number. With my macro,
stores 1-4 would be saved into a file called 101.xls. Only store 5
would be saved into 102.xls and so on. This code is working fine, but
I need to add a new twist.
Now, store 1 has a sister store in store 6. So, I need to add store 6
to 101.xls even though it's a different territory number. There's no
real logic about which stores have sister stores, so I think it's
something I'll have to hard code, which is fine because not many stores
have sister stores.
I apologize for giving the abridged version of my problem earlier. It
probably just led to more confusion.
Thanks again


--
brocklanders
------------------------------------------------------------------------
brocklanders's Profile: http://www.excelforum.com/member.php...o&userid=35205
View this thread: http://www.excelforum.com/showthread...hreadid=549697