![]() |
MIN/MAX question
How do you write a min/max formula in VB?
Within a macro I'm trying to get the minimum of two numbers. I tried the following and got an error: END = MIN(BEGROW +10, MAXROW) Where BEGROW and MAXROW are calclutaed within the macro. thanks |
MIN/MAX question
worksheetfunction.max(BEGROW+10,MAXROW)
-- HTH RP "Mike" wrote in message ... How do you write a min/max formula in VB? Within a macro I'm trying to get the minimum of two numbers. I tried the following and got an error: END = MIN(BEGROW +10, MAXROW) Where BEGROW and MAXROW are calclutaed within the macro. thanks |
MIN/MAX question
Thank you so much!
-----Original Message----- worksheetfunction.max(BEGROW+10,MAXROW) -- HTH RP "Mike" wrote in message ... How do you write a min/max formula in VB? Within a macro I'm trying to get the minimum of two numbers. I tried the following and got an error: END = MIN(BEGROW +10, MAXROW) Where BEGROW and MAXROW are calclutaed within the macro. thanks . |
MIN/MAX question
Function MyMin(A, B)
if A < B then MyMin = A else MyMin = B End if End Function You can add error checking and so forth. -- Regards, Tom Ogilvy "Mike" wrote in message ... How do you write a min/max formula in VB? Within a macro I'm trying to get the minimum of two numbers. I tried the following and got an error: END = MIN(BEGROW +10, MAXROW) Where BEGROW and MAXROW are calclutaed within the macro. thanks |
All times are GMT +1. The time now is 10:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com