LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Logical test as a variable in a UDF

Hello - Is it possible to pass a logical test through a variable? For example:

function testFunc(A as integer, test as String, B as integer)
if (A test B) then
testFunc = "A is greater than B"
else:
testFunc = "A is not greater than B"
end if
end function


And entered like so in the spreadsheet:

=test(2,"",1)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use 'CONTAINS' in an IF Logical Test? MichaelRobert Excel Worksheet Functions 3 April 2nd 23 08:11 PM
Logical Test Melody Excel Worksheet Functions 5 February 20th 08 03:26 AM
logical test LisaD Excel Worksheet Functions 3 August 8th 06 03:24 PM
logical test Ron Coderre Excel Worksheet Functions 0 August 7th 06 08:02 PM
Logical test Sooraj Excel Discussion (Misc queries) 2 January 25th 05 12:59 PM


All times are GMT +1. The time now is 06:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"