Max Function

G

Guest

I want a variable to be set equal to the max number in my
B column. It isn't working. Here is what I have:

NumberOfSubs= MAX(B3:"B" & FinalRow)

FinalRow is my variable for the last row.
 
F

Frank Kabel

Hi
try
NumberOfSubs = application.worksheetfunction.max(Range("B3:B" &
FinalRow))
 
P

Pete McCosh

You have your " in the wrong place. Try:

application.worksheetfunction.Max(range("b3:B" & x))

Pete
 
Top