S
ste mac
Hi there, the code below works out the amount of rows on each sheet
and
divides it up percentage(wise) working from the top of the sheet,
starting
at 0% right down to the bottom of the used rows, ending at 100% on
each
range for each sheet...my question is:
Can this be turned upside down without using a 'sort' macro as it is
already sorted before the %ages are added..
So the top of the sheet/range is 100% and the bottom is 0%...
Thanks for any help anyone can give...cheers, ste
Sub getdepth()
Application.ScreenUpdating = False
For sheetNumber = 1 To 56
SheetName = "S" & Format(sheetNumber, "##0")
Sheets(SheetName).Select
xlrow = 3
Do While Not (ActiveSheet.Cells(xlrow, 1).Value = "")
ActiveSheet.Cells(xlrow, 10).Value = Format((xlrow /
ActiveSheet.Cells(1, 2).Value), "#0.0%")
xlrow = xlrow + 1
Application.StatusBar = "System Status: " & Format(xlrow
/ ActiveSheet.Cells(1, 2), "00%") & " of Depth %age for " & SheetName
& " have been built..."
Loop
Next
Application.StatusBar = False
Sheets("Selection").Select
checksystem_forblanks
End Sub
and
divides it up percentage(wise) working from the top of the sheet,
starting
at 0% right down to the bottom of the used rows, ending at 100% on
each
range for each sheet...my question is:
Can this be turned upside down without using a 'sort' macro as it is
already sorted before the %ages are added..
So the top of the sheet/range is 100% and the bottom is 0%...
Thanks for any help anyone can give...cheers, ste
Sub getdepth()
Application.ScreenUpdating = False
For sheetNumber = 1 To 56
SheetName = "S" & Format(sheetNumber, "##0")
Sheets(SheetName).Select
xlrow = 3
Do While Not (ActiveSheet.Cells(xlrow, 1).Value = "")
ActiveSheet.Cells(xlrow, 10).Value = Format((xlrow /
ActiveSheet.Cells(1, 2).Value), "#0.0%")
xlrow = xlrow + 1
Application.StatusBar = "System Status: " & Format(xlrow
/ ActiveSheet.Cells(1, 2), "00%") & " of Depth %age for " & SheetName
& " have been built..."
Loop
Next
Application.StatusBar = False
Sheets("Selection").Select
checksystem_forblanks
End Sub