Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Writing a UDF

I used this (see below) UDF successfully (can't believe it) but now I want to
do te opposite where 15 =A+, no idea how to write it!

Function Grades(Letter As String) As Integer
Select Case Letter
Case Is = "A+"
Grades = 15
Case Is = "A"
Grades = 14
Case Is = "A-"
Grades = 13
Case Is = "B+"
Grades = 12
Case Is = "B"
Grades = 11
Case Is = "B-"
Grades = 10
Case Is = "C+"
Grades = 9
Case Is = "C"
Grades = 8
Case Is = "C-"
Grades = 7
Case Is = "D+"
Grades = 6
Case Is = "D"
Grades = 5
Case Is = "D-"
Grades = 4
Case Is = "F+"
Grades = 3
Case Is = "F"
Grades = 2
Case Is = "F-"
Grades = 1
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
Writing UDF Help jlclyde Excel Discussion (Misc queries) 4 April 22nd 08 08:30 PM
Writing IF Statement Angie Excel Worksheet Functions 4 June 5th 07 10:10 PM
q; Writing to files JIM.H. Excel Discussion (Misc queries) 1 April 23rd 07 10:36 PM
Writing to csv Jeff Excel Discussion (Misc queries) 2 March 16th 07 01:35 PM
Need help writing formula plz.. nparrott Excel Discussion (Misc queries) 7 February 10th 06 05:26 PM


All times are GMT +1. The time now is 12:27 PM.

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"