Thread: [Solved] Help with Code
View Single Post
 
Old 02-19-2017, 03:57 PM
Logit Logit is offline Windows 10 Office 2007
Expert
 
Join Date: Jan 2017
Posts: 533
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

Option Explicit

Sub MacroTry1()
'
' MacroTry1 Macro
Dim Specifiedrange As Range
Set Specifiedrange = Application.InputBox("Specify the range:", Type:=8)
Specifiedrange.Name = "Table"
ActiveCell.FormulaR1C1 = "=COUNTIF(Table,"">0"")"
Range("E2").Select
ActiveCell.FormulaR1C1 = "=COUNT(Table)"
Range("F2").Select
ActiveCell.FormulaR1C1 = "=RC[-1]-RC[-2]"
Range("D3").Select

Set Specifiedrange = Nothing '<--- ????

End Sub
Reply With Quote