Hello,
I've created a table and a macro command "Testas2", which sorts a table depending on few columns. But my macro command excludes the first row (except a header). What am I doing wrong?
Hello,
I've created a table and a macro command "Testas2", which sorts a table depending on few columns. But my macro command excludes the first row (except a header). What am I doing wrong?
I don't see a sorting macro in that workbook (although my Excel had to repair it to open it).
Rory
I have attached a new workbook. The table is in Sheet1. Macro name is "Testas2"
Why are you using Testas2 rather than Testas which uses the correct syntax for sorting a table.
testas works just for sorting column B "Gofra". But I want to sort table by column B, then by column C then by E and finally by column F. Testas2 works with that, but excludes the first row
All you need to do is repeat the sortfields.add line with the additional columns, in order.
You have declared table1 as A7:L14, Which excludes the header row. But in the code it is shown
.Header = xlYes.
So it excludes the the first row of Table1(Row7)
Change the above line in the code as
.Header = xlNo
Or
Declare the table range as A6:L14.
Pl note
Array formula should be confirmed with Ctrl+Shift+Enter keys together.
If answere is satisfactory press * to add reputation.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks