I was given an excel worksheet to take over, and they had the info below as a macro in the sheet. Is there a way to just have this as a formula in the cell instead of having it as a macro? - Thanks Michelle
-------------------------------------------
Public Function CostCalc(IndCost, GrpCost, Students)

If IndCost = "" And GrpCost = "" Then
CostCalc = ""

ElseIf IndCost <> "" And GrpCost = "" Then
CostCalc = IndCost * Students

ElseIf IndCost = "" And GrpCost <> "" Then
CostCalc = ""

ElseIf IndCost <> "" And GrpCost <> "" And (IndCost * Students) > GrpCost Then
CostCalc = GrpCost * (Students / 30)

ElseIf IndCost <> "" And GrpCost <> "" And (IndCost * Students) < GrpCost Then
CostCalc = IndCost * Students

ElseIf IndCost <> "" And GrpCost <> "" And (IndCost * Students) = GrpCost Then
CostCalc = IndCost * Students

Else
Mon = "UNDEFINED"
End If

End Function