jsabo
12-05-2012, 11:32 AM
Bear with me, i'm new to all this and might not explain this clearly. I have got a column that contains an if statement that calculates days overdue. Some of the cells contained are blank and these rows can not be deleted. Simply putting "" for these blank cells causes sorting high to low to put these blank cells at the top.
Any ideas? My first idea was to somehow apply some sort of conditioning where, say, selection.NumberFormat = ";;;" would allow me to put "0" instead of "" which would put the blank cells at the bottom of the sort. Again, the cells have to look blank, can not read as "0". I have no idea how to apply this to what i've already got:
Columns("H:H").Select
selection.NumberFormat = "#,##0"
Range("H2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-2]<>""nulldate"", TODAY()-RC[-2], ""0"")"
Range("H3").Select
Dim LastRow As Long
LastRow = Cells.Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Range("H2:H" & LastRow).FillDown
Please help! Thanks in advance.
Any ideas? My first idea was to somehow apply some sort of conditioning where, say, selection.NumberFormat = ";;;" would allow me to put "0" instead of "" which would put the blank cells at the bottom of the sort. Again, the cells have to look blank, can not read as "0". I have no idea how to apply this to what i've already got:
Columns("H:H").Select
selection.NumberFormat = "#,##0"
Range("H2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-2]<>""nulldate"", TODAY()-RC[-2], ""0"")"
Range("H3").Select
Dim LastRow As Long
LastRow = Cells.Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Range("H2:H" & LastRow).FillDown
Please help! Thanks in advance.