hello first of all;
I am an amateur in vba and english, sory!
how can i speed up the following code. I know it's a lot of loops, but that's all I could do. Thank you in advance for your help.
Please Login or Register to view this content.
hello first of all;
I am an amateur in vba and english, sory!
how can i speed up the following code. I know it's a lot of loops, but that's all I could do. Thank you in advance for your help.
Please Login or Register to view this content.
Is there any experts to help?
Rather than asking to fix your code, explain exactly what you are trying to do.
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
It's probably supposed to work like this:
1. Create a square matrix (as shown in the picture, but in memory) from a one-dimensional array Array(10, 20, 30, 40, 50, 60, 70, 80, 90)
2. Find and list numbers when:
a / the sum in the row is 150
b / the sum in the column is 150
c / the sum of one diagonal is 150
d / the sum of the other diagonal is 150.
For this example, we should get the following set of numbers:
Ad. a/ 40,50,60
Ad. b/ 20,50,80
Ad. c/ 10,50,90
Ad. d/ 30,50,70
The macro is also supposed to work on larger matrices, at least 4x4, 5x5
But that's only the author of the thread knows exactly.
If that's how it is supposed to work, the author has very complicated the calculations in the code.
Artik
I made the explanation in the code, but it wasn't very enlightening. my fault, now I added the excel file
actually the problem is alphamagical squares
in summary as follows;
5 22 18
28 15 2
12 8 25
the sum of all rows, columns and diagonals is 45
five twenty-two eighteen
twenty-eight fifteen two
twelve eight twenty-five
The new square formed by the character lengths of the writing of the numbers has a similar feature. then this is an alphamagical square
example: five= 4 character
4 9 8
11 7 3
6 5 10
the sum of all rows, columns and diagonals is 21
what I am looking for is how many different ways the numbers in column A can form magic squares and listing them.
note: When I log in as a member, the png file sent by dear Artik does not appear
book matrix - Kopya.xlsx
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks