I need to select the last cell in my specified range.
I am pulling data from a database. I successfully go to the right sheet, and find & select the variable number of managers (starting two rows down from "Number of Managers". Now I just need to select the last line of the active cells and run my If statement below.
Windows("MCS Cumulative_Data.xls").Activate
Sheets("Sheet 12").Select
Range("A1").Select
Cells.Find(What:="Number of Managers", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(2, 0).Select
Range(ActiveCell, ActiveCell.End(xlDown)).Select
' Part of Code, but not Important to question.
ActiveCell.Offset(0, 1).Select
If ActiveCell.Value = "" Then
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "0"
Else
End If
I've tried about 15 different Dim statements from other questions. They all seem like be close to asking what I am, but not exactly.