W
whelanj
hey there. not much experience with VB. trying to make a book that th
user enters data in one spreadsheet and then based in a defined rang
in which the value falls, the UDF will be given an integer ranking i
another spreadsheet. a ranking system based on physical data.
the problem i'm having is that 0 is a significant value and having a
empty cell returns a integer rank which i DON'T want. is there any cod
that the UDF will recognize the cell is empty rather than a use
entered 0?
i was thinking of using strings but i have no idea how to do this i
VB. if this isn't clear let me know...
here's the code
*
Function UtilizationRank(Utilization As Integer) As Integer
If Utilization > 90 Then
UtilizationRank = 1
ElseIf Utilization <= 90 And Utilization > 75 Then
UtilizationRank = 2
ElseIf Utilization <= 75 And Utilization > 50 Then
UtilizationRank = 3
ElseIf Utilization <= 50 And Utilization > 0 Then
UtilizationRank = 4
ElseIf Utilization = 0 Then
UtilizationRank = 5
End If
End Function
*
... so an empty cell gives a rank of five which I don't want. help i
greatly apprechiated
user enters data in one spreadsheet and then based in a defined rang
in which the value falls, the UDF will be given an integer ranking i
another spreadsheet. a ranking system based on physical data.
the problem i'm having is that 0 is a significant value and having a
empty cell returns a integer rank which i DON'T want. is there any cod
that the UDF will recognize the cell is empty rather than a use
entered 0?
i was thinking of using strings but i have no idea how to do this i
VB. if this isn't clear let me know...
here's the code
*
Function UtilizationRank(Utilization As Integer) As Integer
If Utilization > 90 Then
UtilizationRank = 1
ElseIf Utilization <= 90 And Utilization > 75 Then
UtilizationRank = 2
ElseIf Utilization <= 75 And Utilization > 50 Then
UtilizationRank = 3
ElseIf Utilization <= 50 And Utilization > 0 Then
UtilizationRank = 4
ElseIf Utilization = 0 Then
UtilizationRank = 5
End If
End Function
*
... so an empty cell gives a rank of five which I don't want. help i
greatly apprechiated