Identifying when all values in a range are the same.

M

MichaelZ

I have a row of user inputted responses (e.g., F20:K20). The possible
responses are “Noneâ€, “Lowâ€, “Mediumâ€, and “Highâ€. These result in a number
value = 0, 1, 3, or 5, respectively in cells L20:Q20. I’d like a routine
that will create an “X†in a table on a separate worksheet when all of the
number values for a particular row are the same (e.g., all 0s in L20:Q20).
The problem is that it is not known beforehand how many of the cells F thru K
(and hence, cells L thru Q) will have responses. If a cell in the range F
thru K is left blank, a “FALSE†is returned in the corresponding cell in the
range L thru Q. However, I don’t want the “FALSE†cells to be included in
the determination of whether all of the number values for a particular row
are the same. A second, issue is that when the number values for a
particular row are the same, it is not known beforehand what the number value
will be, other than it will be either 0, 1, 3, or 5.

Anyone’s help is greatly appreciated. Thank you.
 
M

MichaelZ

GS
This seems to be returning "all the same" for everything, even when the
values in L:Q are not all the same.
Help. Thanks.
 
L

Luke M

Are L20:Q20 formatted as text? They need to be actual numbers. Also, since
they are coming from a formula, make sure the formula returns a number, e.g.
=IF(F20="med",3,false)
and NOT
=if(F20="med","3",false)
 
M

MichaelZ

GS,
I apologize, I was pointing to the wrong spreadsheet. Your formula appears
to be working fine.
Thanks ever so much.
MZ
 
S

Sheeloo

How and where did you copy the formula?

You shoud enter the formula given by Gary's Student in a cell in Row 20
=IF(MIN(L20:Q20)=MAX(L20:Q20),"all the same","not all the same")
then copy it down..

I tested on sample data and it works as it should.
 
M

MichaelZ

Gary's Student, Luke M, and Sheeloo,

Gary's Student's formula is working just great. I was pointing to the wrong
sheet. Problem solved. Thanks for everyone's quick and accurate advice.
MZ
 

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

Top