ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   use only VBA - help (https://www.excelbanter.com/excel-programming/279839-use-only-vba-help.html)

mark

use only VBA - help
 
Hi,

My previous post is disappear...
It's request for a good programmers. How do I do in VBA?
Example below had probably solution in Turbo Pascal :)
I mean VBA manage too.

I have following table:

Owner Nr_flight Date Distance Pigeon Points
X 1 10-05-2003 100 X1 20,2
X 1 10-05-2003 100 X2 21,3
Y 1 10-05-2003 102 Y1 22,1
Y 1 10-05-2003 102 Y2 23,5
N 1 10-05-2003 105 N1 19,1
N 2 15-05-2003 120 N1 25,1
X 2 15-05-2003 121 X1 26,1
X 2 15-05-2003 121 X2 27,4
Y 2 15-05-2003 125 Y3 25,2
X 3 20-05-2003 130 X5 30,4
Y 4 25-05-2003 150 Y3 32,1

There are above is thousands records...
Range contents of columns:
-50 Owners,
-20 Nr_flights,
-Date (no matter),
-Distance in km (no matter),
-Each Owner has dozens pigeons,
-Points (no matter)


I'd like folowing automatic result:

W = sum best of points of 2 pingeons Owner (e.g. X) in
range beetwen 100
and 125 km.
N = sum best of points of 3 pingeons Owner (e.g. X)in
range beetwen 126
and 140 km.
count_optimum (for Owner) = W + N
Necessary condition:
Total distance counted pingeons must be minimum 650 km.

If fulfil necessary condition and count_optimum is
counted, i'd like do in VBA following array in another
sheet:
Owner perform condition (e.g. X)sum(count_optimum) = ...
item Nr_flight Date Distance Pingeon Points
1 (e.g. 1) 10-05-2003 100 (e.g. X1) 20,2
2...
3...
4...
5...
sum of total distance ...

(3 rows empty)

Owner perform condition (e.g. Y) sum of points = ...
item Nr_flight Date Distance Pingeon Points
1 (e.g. 1) 10-05-2003 102 (e.g Y1) 22,1
2...
3...
4...
5...
sum of total distance ...

etc....all case perform condition

How could I do this?
It will be appreciate if anyone can help me and give me
more details.

Best Regards
Mark

keepITcool

use only VBA - help
 
Try solver addin to find your optimum values.

When solver can do it..
then use macro recorder
then steamline the code.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Mark" wrote:

Hi,

My previous post is disappear...
It's request for a good programmers. How do I do in VBA?
Example below had probably solution in Turbo Pascal :)
I mean VBA manage too.


I'd like folowing automatic result:

W = sum best of points of 2 pingeons Owner (e.g. X) in
range beetwen 100
and 125 km.
N = sum best of points of 3 pingeons Owner (e.g. X)in
range beetwen 126
and 140 km.
count_optimum (for Owner) = W + N
Necessary condition:
Total distance counted pingeons must be minimum 650 km.

If fulfil necessary condition and count_optimum is
counted, i'd like do in VBA following array in another
sheet:

etc....all case perform condition

How could I do this?
It will be appreciate if anyone can help me and give me
more details.

Best Regards
Mark



mark

use only VBA - help
 
Hi,
As I mentioned erlier I'd like only code in VBA (without
SOlver)
I know it's hard to do
Regards
Mark

-----Original Message-----
Try solver addin to find your optimum values.

When solver can do it..
then use macro recorder
then steamline the code.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Mark" wrote:

Hi,

My previous post is disappear...
It's request for a good programmers. How do I do in VBA?
Example below had probably solution in Turbo Pascal :)
I mean VBA manage too.


I'd like folowing automatic result:

W = sum best of points of 2 pingeons Owner (e.g. X) in
range beetwen 100
and 125 km.
N = sum best of points of 3 pingeons Owner (e.g. X)in
range beetwen 126
and 140 km.
count_optimum (for Owner) = W + N
Necessary condition:
Total distance counted pingeons must be minimum 650 km.

If fulfil necessary condition and count_optimum is
counted, i'd like do in VBA following array in another
sheet:

etc....all case perform condition

How could I do this?
It will be appreciate if anyone can help me and give me
more details.

Best Regards
Mark


.


Tom Ogilvy

use only VBA - help
 
You post is still in the newgroup. If you can't find it, probably won't be
able to find an answer to this one either.

I previously provided a worksheet function solution for the part I could
understand.

--
Regards,
Tom Ogilvy

"Mark" wrote in message
...
Hi,
As I mentioned erlier I'd like only code in VBA (without
SOlver)
I know it's hard to do
Regards
Mark

-----Original Message-----
Try solver addin to find your optimum values.

When solver can do it..
then use macro recorder
then steamline the code.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Mark" wrote:

Hi,

My previous post is disappear...
It's request for a good programmers. How do I do in VBA?
Example below had probably solution in Turbo Pascal :)
I mean VBA manage too.


I'd like folowing automatic result:

W = sum best of points of 2 pingeons Owner (e.g. X) in
range beetwen 100
and 125 km.
N = sum best of points of 3 pingeons Owner (e.g. X)in
range beetwen 126
and 140 km.
count_optimum (for Owner) = W + N
Necessary condition:
Total distance counted pingeons must be minimum 650 km.

If fulfil necessary condition and count_optimum is
counted, i'd like do in VBA following array in another
sheet:

etc....all case perform condition

How could I do this?
It will be appreciate if anyone can help me and give me
more details.

Best Regards
Mark


.




Mark[_17_]

use only VBA - help
 
Hi Tom!
Could You write more detail for total automatization my
example, please.
You previous answer contain only function.
In my Excel work only below function:

=large(if((D2:D2000=100)*(D2:D2000<=125);F2:F2000 );1))
+large(if((D2:D2000=100)*(D2:D2000<=125);F2:F2000 );2)))
+...

But, can you read my first post again, it's no solution of
my problem - i looking for max score for each Owner with
fulfilment necessary conditions.

Can you show my power of VBA? :)

Best regards

mark


-----Original Message-----
You post is still in the newgroup. If you can't find it,

probably won't be
able to find an answer to this one either.

I previously provided a worksheet function solution for

the part I could
understand.

--
Regards,
Tom Ogilvy

"Mark" wrote in

message
...
Hi,
As I mentioned erlier I'd like only code in VBA (without
SOlver)
I know it's hard to do
Regards
Mark

-----Original Message-----
Try solver addin to find your optimum values.

When solver can do it..
then use macro recorder
then steamline the code.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Mark" wrote:

Hi,

My previous post is disappear...
It's request for a good programmers. How do I do in

VBA?
Example below had probably solution in Turbo

Pascal :)
I mean VBA manage too.


I'd like folowing automatic result:

W = sum best of points of 2 pingeons Owner (e.g. X)

in
range beetwen 100
and 125 km.
N = sum best of points of 3 pingeons Owner (e.g. X)in
range beetwen 126
and 140 km.
count_optimum (for Owner) = W + N
Necessary condition:
Total distance counted pingeons must be minimum 650

km.

If fulfil necessary condition and count_optimum is
counted, i'd like do in VBA following array in

another
sheet:

etc....all case perform condition

How could I do this?
It will be appreciate if anyone can help me and give

me
more details.

Best Regards
Mark


.



.


Tom Ogilvy

use only VBA - help
 
solution I provided was based on what I understood from your question. I
have read it several times and it doesn't contain any question about max
score for each owner.

If you can post an understandable question, someone might be willing to
help.

--
Regards,
Tom Ogilvy

"Mark" wrote in message
...
Hi Tom!
Could You write more detail for total automatization my
example, please.
You previous answer contain only function.
In my Excel work only below function:

=large(if((D2:D2000=100)*(D2:D2000<=125);F2:F2000 );1))
+large(if((D2:D2000=100)*(D2:D2000<=125);F2:F2000 );2)))
+...

But, can you read my first post again, it's no solution of
my problem - i looking for max score for each Owner with
fulfilment necessary conditions.

Can you show my power of VBA? :)

Best regards

mark


-----Original Message-----
You post is still in the newgroup. If you can't find it,

probably won't be
able to find an answer to this one either.

I previously provided a worksheet function solution for

the part I could
understand.

--
Regards,
Tom Ogilvy

"Mark" wrote in

message
...
Hi,
As I mentioned erlier I'd like only code in VBA (without
SOlver)
I know it's hard to do
Regards
Mark

-----Original Message-----
Try solver addin to find your optimum values.

When solver can do it..
then use macro recorder
then steamline the code.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Mark" wrote:

Hi,

My previous post is disappear...
It's request for a good programmers. How do I do in

VBA?
Example below had probably solution in Turbo

Pascal :)
I mean VBA manage too.


I'd like folowing automatic result:

W = sum best of points of 2 pingeons Owner (e.g. X)

in
range beetwen 100
and 125 km.
N = sum best of points of 3 pingeons Owner (e.g. X)in
range beetwen 126
and 140 km.
count_optimum (for Owner) = W + N
Necessary condition:
Total distance counted pingeons must be minimum 650

km.

If fulfil necessary condition and count_optimum is
counted, i'd like do in VBA following array in

another
sheet:

etc....all case perform condition

How could I do this?
It will be appreciate if anyone can help me and give

me
more details.

Best Regards
Mark


.



.





All times are GMT +1. The time now is 05:39 PM.

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