1 Attachment(s)
[RESOLVED] Sorting two matrices
Hello! I'm new to this forum, tho I have read many posts I have yet to post my own, so here it is!
In the following attachement I have a sorting issue i have tried different macros/formulas to sort. The "Start" sheet shows the raw data, and the "Finish" sheet shows the result I want.
The sorting process,
You can look at it as two big matrices divided into smaller ones:
"Big"
- Coloumns A:F (Ref:1)
- Coloumns G:J (Ref:2)
Divided into "smaller"
- Coloumns A2:F3
- Coloumns G2:J3 and so on..
and between the value "Total lines" in coloumn "A".
what I want is coloumns "J" and "D" to match eatchother, within the "Total lines" areas.
If there is more then one of the same observation in "J" or "D" I'd like there to be inserted a row, and the observation put there. If there is no match, it can just be listed below ref1 or ref2, respectively.
Does any of you know a simple way to sort this? Matrix array sorting with match? Alle suggestions are appreciated! :)
Attachment 115893
Re: [RESOLVED] Sorting two matrices
I've learned ALOT! Thank you for your help, as a finishing comment, can you recommend a book/site/ place other then this forum ;) to educate myself in the more advanced stuff, like you just did :)
Re: [RESOLVED] Sorting two matrices
Quote:
can you recommend a book/site/ place other then this forum
not really, i learn most here answering for others, there are other forums that help with formulas and /or code, but this seems good for most general office application problems, code or formula
there are, i am sure, many books and references, but i have not had any on office application object models
i still have to test that i get the correct ranges returned, when using offset and resize etc
Re: [RESOLVED] Sorting two matrices
@westconn1
Thank you, I'll keep an eye on this forum ;)
Btw the code "If Not IsEmpty(c) Or c = c.Offset(, 6) Then"
did not work, but adding a new if statement like so:
If Not c.Offset(, 6) Then
End if
and it works
Quote:
Originally Posted by
westconn1
i still have to test that i get the correct ranges returned, when using offset and resize etc
Is there an easy way to test this?
Re: [RESOLVED] Sorting two matrices
@westconn1
Thank you, I'll keep an eye on this forum ;)
Btw the code "If Not IsEmpty(c) Or c = c.Offset(, 6) Then"
did not work, but adding a new if statement like so:
If Not c.Offset(, 6) Then
End if
and it works
Quote:
Originally Posted by
westconn1
i still have to test that i get the correct ranges returned, when using offset and resize etc
Is there an easy way to test this?
Re: [RESOLVED] Sorting two matrices
Re: [RESOLVED] Sorting two matrices
Quote:
Is there an easy way to test this?
yes in the immediate window at a break in the code
like
?fnd.Offset(, -3).Resize(, 4).address
Re: [RESOLVED] Sorting two matrices