K
karthik
Hi,
I am building a system that enters data from worksheet --> a to
worksheet -->b as follows
newRow = Worksheets(sheetName).Range("B65536").End(xlUp).Row + 1
Worksheets(sheetName).Cells(newRow, 2).Value =
Worksheets("Dashboard").Range("K35").Value
Worksheets(sheetName).Cells(newRow, 3).Value =
Worksheets("Dashboard").Range("L35").Value
Worksheets(sheetName).Cells(newRow, 4).Value =
Worksheets("Dashboard").Range("M35").Value
Worksheets(sheetName).Cells(newRow, 5).Value =
Worksheets("Dashboard").Range("N35").Value
Now I want it to automatically sort the data based on the date in cell
E of the worksheet --> sheetName
I am currently doing this: which just returns an error (1004)
Worksheets(sheetName).Range("A10:G").Sort
Key1:=Worksheets(sheetName).Columns("E"), Order1:=xlDescending
Thanks,
Karthik
I am building a system that enters data from worksheet --> a to
worksheet -->b as follows
newRow = Worksheets(sheetName).Range("B65536").End(xlUp).Row + 1
Worksheets(sheetName).Cells(newRow, 2).Value =
Worksheets("Dashboard").Range("K35").Value
Worksheets(sheetName).Cells(newRow, 3).Value =
Worksheets("Dashboard").Range("L35").Value
Worksheets(sheetName).Cells(newRow, 4).Value =
Worksheets("Dashboard").Range("M35").Value
Worksheets(sheetName).Cells(newRow, 5).Value =
Worksheets("Dashboard").Range("N35").Value
Now I want it to automatically sort the data based on the date in cell
E of the worksheet --> sheetName
I am currently doing this: which just returns an error (1004)
Worksheets(sheetName).Range("A10:G").Sort
Key1:=Worksheets(sheetName).Columns("E"), Order1:=xlDescending
Thanks,
Karthik