GET MIN AND MAX FROM ARRAY...

USUARIO.EXCLUIDOS 03/09/2007 10:49:09
#233832
in column A have a value related column D.
In effect in D are the value of Principal Agency and in column A are the value of Sub Agency of Principal Agency.
Now based column D how to ,(with a function or macro) get and store in a variable the value of min and max of Sub Agengy?

Example:
for all 4580 in column D get the min and max from column A.
In this case the min is 4500 the max is 6552
The name of variable is MIN_Agency and MAX_Agency
Tks.

Sorry for my terrible englhis, sure i dont know portughes;-)

Note: all column are in Text format
column A column D
0500 0580
0501 0580
0502 0580
0503 0580
0504 0580
0505 0580
0506 0580
0507 0580
0543 0580
0546 0580
0549 0580
0552 0580
0555 0580
0558 0580
0561 0580
0564 0580
0567 0580
0570 0580
0576 0580
0579 0580
0580 0580
0582 0580
1700 4780
1701 4780
1702 4780
1703 4780
1704 4780
1743 4780
1746 4780
1749 4780
1752 4780
1755 4780
1758 4780
2000 2380
2043 2380
2044 2380
2046 2380
2049 2380
2052 2380
2055 2380
2300 2380
2301 2380
2302 2380
2343 2380
2346 2380
2349 2380
2352 2380
2355 2380
2380 2380
2900 0580
2911 0580
2943 0580
2946 0580
2949 0580
3700 0580
3701 0580
3743 0580
3752 0580
3755 0580
3758 0580
4200 4780
4201 4780
4210 4780
4243 4780
4246 4780
4500 4580
4501 4580
4502 4580
4503 4580
4504 4580
4505 4580
4506 4580
4507 4580
4508 4580
4509 4580
4510 4580
4511 4580
4512 4580
4513 4580
4514 4580
4515 4580
4516 4580
4532 4580
4534 4580
4535 4580
4536 4580
4543 4580
4546 4580
4549 4580
4552 4580
4555 4580
4556 4580
4557 4580
4558 4580
4561 4580
4562 4580
4564 4580
4567 4580
4569 4580
4573 4580
4576 4580
4579 4580
4580 4580
4582 4580
4700 4780
4701 4780
4702 4780
4703 4780
4704 4780
4705 4780
4706 4780
4743 4780
4746 4780
4749 4780
4752 4780
4755 4780
4758 4780
4761 4780
4773 4780
4775 4780
4776 4780
4780 4780
5900 2380
5901 2380
5902 2380
5943 2380
5946 2380
6500 4580
6501 4580
6502 4580
6543 4580
6546 4580
6549 4580
6552 4580
6800 0580
6801 0580
6803 0580
6804 0580
6805 0580
6811 0580
6843 0580
6846 0580



USUARIO.EXCLUIDOS 03/09/2007 11:18:07
#233834
Hi, one question this columns are in database? or its a bidimensional Array variable ?
USUARIO.EXCLUIDOS 03/09/2007 11:31:12
#233837
Hi Orlando...
No....
Are only a column in a sheet.

USUARIO.EXCLUIDOS 03/09/2007 11:42:59
#233840
Wow... VBMania out of Brazil! xD

How do...

Apply one filter on the column D with the Code of PrincipalAgency.
Then classify the column A, and get the min(Value of second Line) and the Max(Value of last line).


I will make one exaple for you, and poste here.


Obs.: My english is very bad, sorry for gramatical errors!
MJAC 03/09/2007 12:04:26
#233846
Resposta escolhida
I created this sample for you, until more.
USUARIO.EXCLUIDOS 03/09/2007 13:49:11
#233872
Citação:

MJAC escreveu:
I created this sample for you, until more.


no words!!!!
excellent code! Work perfect.
And i dont know how to understand my english in one "Shot"...;-)

Only one... you have maked code for Classic VB, is possible to arrange the code in VBA for excel and use column A and D for experiment.

Call me in msger or skip if you want to change a word and not anly to make a code. (my account for all gss.italy@_nospam_iol.it)
Tks from Iraly (Napoli)
Sal.
Tópico encerrado , respostas não são mais permitidas