View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
kumar[_2_] kumar[_2_] is offline
external usenet poster
 
Posts: 6
Default multiple combinations

Martin,

Thanks, please help to "add code to store on same page" please

"Martin" wrote in message
...
I would do something like this:
For A=1 to 15 'Division
For B=1 to 150 'CC
For C=1 to 700 'GL
AcctCode=ActiveCell.Offset(A,0).Value & _
ActiveCell.Offset(B,1).Value & _
ActiveCell.Offset(C,2).Value
'Add code to store this new value somewhere
Next C
Next B
Next A

This assumes that the three elements you describe are in consecutive
columns. Keep in mind that you will have over 1.5Million codes

(15*150*700).


Hope this helps.



"kumar" wrote:

Please assisit with a macro to solve this:


Division CC GL element

XYZ 120 10250
DEF 225 12500
ABC 365 30200
runs to runs to runs to
15 150 700


Each district and CC combines with GL element and produces a accounting

code

means 15* 150*700 codes want to produce all codes


Pleasehelp