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
Default user-function not returning any result (newbye)

Hi all!
I'm writing a function with two arguments.
This function is part of a module for the worksheet.
I just can't make it work when inserting it into a spreadsheet cell.

Can you help?

Thanks.
Frisk.


Function Result(Value1 As Double, Value2 As Double) As Byte

Select Case Value2
Case Value2 < (20 / 100)
Result = 1
Case Value2 < (50 / 100)
Result = 2
Case Value2 < (100 / 100)
Result = 3
Case Value2 < (110 / 100)
Result = 4
Case Value2 < (120 / 100)
Result = 5

Case Else

Select Case value1
Case value1 < 20 / 100
Result = 1
Case value1 < 50 / 100
Result = 2
Case value1 < 100 / 100
Result = 3
Case value1 < 110 / 100
Result = 4
Case value1 < 120 / 100
Result = 5

Case Else
Result = 0

End Select

End Select

End Function
 
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
User Defined Function returning #Value! DogLover Excel Worksheet Functions 4 November 25th 09 07:31 PM
Excel Average function not returning expected result gja63 Excel Worksheet Functions 3 August 28th 07 02:06 AM
Average function not returning expected result gja63 Excel Discussion (Misc queries) 4 August 28th 07 12:36 AM
IF function returning incorrect result Hillary E. Excel Worksheet Functions 2 August 22nd 06 05:43 PM
User function for returning several results briansol Excel Programming 2 June 24th 04 12:31 PM


All times are GMT +1. The time now is 09: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"