Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This doesn't work in my subroutine:-
----------------------------- Function MyTest(XRange as Range) as double ...... XMin = MIN(XRange) MyTest=XMin ...... End Function ----------------------------- It gives an error "ByRef argument type mismatch" I don't know - (a) why, and (b) what to use instead. Help, please ? Regards Robin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try it this way...
..... XMin = WorksheetFunction.Min(XRange) MyTest=XMin ..... -- Rick (MVP - Excel) "Robin Clay" <Robin_B DOT Clay AT virgin DOT net wrote in message ... This doesn't work in my subroutine:- ----------------------------- Function MyTest(XRange as Range) as double ..... XMin = MIN(XRange) MyTest=XMin ..... End Function ----------------------------- It gives an error "ByRef argument type mismatch" I don't know - (a) why, and (b) what to use instead. Help, please ? Regards Robin |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Trying adding this to your function:
XMin=Application.WorksheetFunction.Min(XRange) -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "Robin Clay" wrote: This doesn't work in my subroutine:- ----------------------------- Function MyTest(XRange as Range) as double ..... XMin = MIN(XRange) MyTest=XMin ..... End Function ----------------------------- It gives an error "ByRef argument type mismatch" I don't know - (a) why, and (b) what to use instead. Help, please ? Regards Robin |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you !
I had tried that, but as XMin=WorksheetFunction.Min(XRange) without the "Application" bit. Regards Robin "Michael" wrote: Trying adding this to your function: XMin=Application.WorksheetFunction.Min(XRange) -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "Robin Clay" wrote: This doesn't work in my subroutine:- ----------------------------- Function MyTest(XRange as Range) as double ..... XMin = MIN(XRange) MyTest=XMin ..... End Function ----------------------------- It gives an error "ByRef argument type mismatch" I don't know - (a) why, and (b) what to use instead. Help, please ? Regards Robin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Countif Range not working | Excel Worksheet Functions | |||
Working with a range | Excel Discussion (Misc queries) | |||
working with a named range | Excel Programming | |||
Working with range | Excel Programming | |||
range value with variable not working? | Excel Programming |