L
Legacy 93538
Guest
Hi
I am trying to write a piece of code that first does a counta on how many rows in column A have text and then use that value to do a sort on columns A:AQ and then using the counta value to define the number of rows.
I hope this makes sense. Can anyone help me as i am not sure?
this is what i have so far but i dont think its correct.
Thanks
Jeskit
I am trying to write a piece of code that first does a counta on how many rows in column A have text and then use that value to do a sort on columns A:AQ and then using the counta value to define the number of rows.
I hope this makes sense. Can anyone help me as i am not sure?
Code:
k = WorksheetFunction.CountA(workbook.Range("A:A"))
workbook.Sheets(1).Range ("A1:B" & k)
this is what i have so far but i dont think its correct.
Thanks
Jeskit