How to compare multiple cell values

G

Guest

I would like to know if there is a functionality that would let you compare
multiple cell values and indicate when a cell value is dissimilar. basically
i want to look at all the cells in a each column, if all the row values for a
given column are the same value then i want to hide the column, but if any of
the values are dissimilar then leave the column. the row count may change fom
sheet to sheet. thx for any assistance
 
G

Guest

This can be done with a fairly simple formula something like..

=IF(AND(A1=B1,B1=C1,C1=D1,D1=E1,E1=F1,F1=G1,G1=H1), 0, 1)

This formula compares a row from Columns A through H and flags dissimilar
values with a 1. You can then just filter on this new column. Instead of 0
and 1 you can use true and false or some other flags if you want. The nice
part about this way is you can filter and unfilter whenever you want.
 
G

Guest

Let me clarify, i need something to compare values in the same column not
across columns, als0oi dont want a cell formula i need something that can be
used in code with variables.
 
K

keepITcool

I posted a routine today in thread
"Comparing Formulas between Worksheets"
that may be of use.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Chirs wrote :
 

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