View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Scoops Scoops is offline
external usenet poster
 
Posts: 108
Default Multiple If function for more than 7 values


Hi echo_park

It works fine for me, make sure you've got the code in a module or in
the code area of the sheet you're using the function in.

And, aesthetically, you might like this:

Function CalcValue(pVal As String) As Long
Select Case pVal
Case "10x12"
CalcValue = 140
Case "8x8"
CalcValue = 64
Case "6x6"
CalcValue = 36
Case "8x10"
CalcValue = 80
Case "14x16"
CalcValue = 224
Case "9x9"
CalcValue = 81
Case "4x3"
CalcValue = 12
Case Else
CalcValue = 0
End Select
End Function

Regards

Steve