help! what's the formula for this.
Hi driller:
Try this out:
Function dentist(r As Range) As String
dentist = ""
If r.Count = 1 Then
Exit Function
End If
vold = r.Cells(1, 1).Value
i = 1
For Each rr In r
If i 1 Then
If vold rr.Value Then
dentist = "no legal reference"
Exit Function
End If
If vold < rr.Value Then
dentist = "upgraded - evaluated"
Exit Function
End If
Else
i = 2
End If
vold = rr.Value
Next
dentist = "need upgrade - not evaluated"
End Function
use it like:
=dentist(A1:E1)
It should work on rows, column, etc.
Not completely tested. Update this post if you experience problems.
--
Gary''s Student - gsnu200724
"driller" wrote:
how to formulate this?
I have a row (e.g. b1:z1), this contains values that must be in a scenario
like these
(a) All values in the row to be the same, (e.g. 2,2,2,2,2,2,2,2,2,,,,2)
(b) Ascending order, (e.g. 1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,3,,,5)
(c) Descending order. (e.g. 2,2,2,2,2,1,1,1,,,,1)
I need to place a formula on cell a1 to show something like this
1. if all values on same row scenario (a) ...the result will show "need
upgrade - not evaluated"
2. if values are in ascending order scenario (b)......the result will show
"upgraded - evaluated"
3. if the values in descednding order scenario (c)....the result will show
"no legal reference"
i hope i explain it clear for someone who may help me with this.
regards,
driller
--
*****
birds of the same feather flock together..
|