Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to do the following:
When you enter the following function: =SDSUM(A1:B3,$B$1,B1B2) I want the third argument in: Function SDSUM(database, col, criteria) named criteria, not to return whether B1B2 (True of False), but (just) the string. However, I don't want to put quotation marks around it because I want the user to click around in the worksheet to make selections. Any way to do this? Thanks for any ideas. Hessel |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Public Function Test(sStr As String)
Dim sCrit As String Set rng = Application.Caller sCrit = rng.Formula sCrit = Mid(sCrit, 7) Test = Left(sCrit, Len(sCrit) - 1) End Function =Test(B1B2) Returns B1B2 -- Regards, Tom Ogilvy wrote in message oups.com... I'm trying to do the following: When you enter the following function: =SDSUM(A1:B3,$B$1,B1B2) I want the third argument in: Function SDSUM(database, col, criteria) named criteria, not to return whether B1B2 (True of False), but (just) the string. However, I don't want to put quotation marks around it because I want the user to click around in the worksheet to make selections. Any way to do this? Thanks for any ideas. Hessel |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would never have thought of using application.caller for this, but it
works! Thanks a lot! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF: Argument problem | Excel Discussion (Misc queries) | |||
Argument problem | Excel Discussion (Misc queries) | |||
problem passing an argument to a sub | Excel Programming | |||
passing argument problem ?? | Excel Programming | |||
Function (array argument, range argument, string argument) vba | Excel Programming |