I have the macro below where I would like the user to enter the number of characters using an input box. I have pretty much exhausted my excel macro abilities trying to get it to work. Any help would be deeply appreciated. Thanks in advance.
Sub autofill_active_cell3()
Dim x As String
Dim lastrow As Long
x = InputBox("Enter Number of Characters")
lastrow = ActiveCell.Offset(rowOffset:=0, columnOffset:=-1).End(xlDown).Row
    ActiveCell.FormulaR1C1 = "=LEFT(RC[-1], LEN(RC[-1])- (""x"")"
    ActiveCell.Select
    Selection.AutoFill Destination:=Range(ActiveCell, Cells(lastrow, ActiveCell.Column))

End Sub