Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to compare multiple cell values

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default How to compare multiple cell values

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.
--
HTH...

Jim Thomlinson


"Chirs" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to compare multiple cell values

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.

"Jim Thomlinson" wrote:

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.
--
HTH...

Jim Thomlinson


"Chirs" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default How to compare multiple cell values


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 :

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.

"Jim Thomlinson" wrote:

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.
--
HTH...

Jim Thomlinson


"Chirs" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare multiple rows for duplicated values in individual columns LyndonMBA Excel Worksheet Functions 1 February 21st 09 11:34 AM
Compare cell values Grant Excel Worksheet Functions 5 February 24th 05 10:54 AM
Formula to compare multiple rows values based on another column? Murph Excel Worksheet Functions 4 February 21st 05 02:44 AM
compare two cell values on different sheets sagarh Excel Programming 3 February 16th 04 01:42 PM


All times are GMT +1. The time now is 08:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"