Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() How do I expand this macro from ABC to A+ A B C D? Public Function ABCRank(Test_Value As Single, Test_Range As Range, Upper_Cutoff As Single, Lower_Cutoff As Single) Application.Volatile Dim A_Rank As Single Dim B_Rank As Single Dim C_Rank As Single A_Rank = Excel.WorksheetFunction.Percentile(Test_Range, Upper_Cutoff) A_Rank = Format(A_Rank, "0.00") C_Rank = Excel.WorksheetFunction.Percentile(Test_Range, Lower_Cutoff) C_Rank = Format(C_Rank, "0.00") Select Case Test_Value Case Is = A_Rank ABCRank = "A" Case Is <= C_Rank ABCRank = "C" Case Else If Test_Value < A_Rank And Test_Value C_Rank Then ABCRank = "B" Else ABCRank = "Error" End If End Select End Function +-------------------------------------------------------------------+ |Filename: ABC-1.zip | |Download: http://www.excelforum.com/attachment.php?postid=4391 | +-------------------------------------------------------------------+ -- nander ------------------------------------------------------------------------ nander's Profile: http://www.excelforum.com/member.php...fo&userid=6156 View this thread: http://www.excelforum.com/showthread...hreadid=515592 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
expand row to fit | Excel Worksheet Functions | |||
Looking to Expand on Text to Columns Macro | Excel Discussion (Misc queries) | |||
Dana: help with your Demo() macro to "expand" formulas | Excel Worksheet Functions | |||
Use a macro to expand data series for chart? | Charts and Charting in Excel | |||
Macro to expand formulas to additional rows | Excel Discussion (Misc queries) |