inverse matrix

le888

Registered User.
Local time
Today, 02:11
Joined
Dec 10, 2003
Messages
344
Hi,

How can I inverse a matrix in Excel? Example, I have 3 rows and in each row I have 10 values. I would like to copy this values in a inverse order, it likes a mirror of data. Please see attachement.

Thanks,

Le888
 

Attachments

As this is 3 days old this may be too late but here goes.

I take it that this is not a one off, and that you could have many rows not just 3, but the principle is the same in any case.

To inverse the matrix add a col at the last col+1, in your case col K, in this col create a series 1- whatever, ie 1-3, and sort descending your data rows on that col, delete that col.

Brian
 
No is not too late. Thanks.

How can I count to the late row and then using this value to subtract by 1? Something like this

Sheet2.range("A1") = Sheet1.range("last_row_number")
Sheet2.range("A2") = Sheet1.range("last_row_number -1")
etc...

How can you write the above code to do automatically to the end?

Thanks,

Le888
 
This should get you started. You have to complete the "For... Next" portion.
Code:
Sub test()
    Dim lngLastRow As Long, lngInt As Long, lngFirstRow As Long
    Dim rngStart As Range
    
    lngLastRow = Range("B" & Rows.Count).End(xlUp).Row
    Set rngStart = Application.InputBox("select cell", Type:=8)
    lngFirstRow = rngStart.Row
    For lngInt = lngLastRow To lngFirstRow Step -1
        
End Sub
________
Trichomes pictures
 
Last edited:

Users who are viewing this thread

Back
Top Bottom