MAX Function in VBE

P

pls123

hi all !
is there a way to use a MAX or MIN function in VBE ??
like this..TX !

if P5 > max (P9;P10;P11) THEN
P5 = ZERO
END IF
 
R

Rick Rothstein

Not sure what P9, P10 and P11 are... variables or range references (the
semicolon delimiters are confusing)? Either way, this should work...

If P5 > WorksheetFunction.Max(P9, P10, P11) Then
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top