help! what's the formula for this.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Try this:

=IF(B1>Z1,"No legal reference",IF(B1<Z1,"Upgraded - evaluated","Need
upgrade - Not evaluated"))
 
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 and Ragdyer,

sorry...i forgot the last scenario
(d) out of order ...(e.g. 2,2,2,2,1,1,1,3,3,3,.....4)
----
4. if the values in out of order scenario (d)....the result will show "out
of order"....

this may complete the query..

thanks and regards,
driller
 
the range may not be filled completely ...some are blanks and some has
numeric values...<no formulas will rest in these range>

i will use the formula to screen the status of values arranged in a +100
field rows.

thanks and regards,
 
Will the empty cells be at the end of the range or can they be *anywhere*
within the range including the first cell of the range?

Biff
 
This is really complicated even though on the surface it may seem easy.

You should change your name to *killer*! <G>

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top