#1   Report Post  
TangentMemory
 
Posts: n/a
Default Comparing Arrays

Is there a way to compare two arrays and output message if they are exactly
the same, and output a different message if there is a difference in the
array. I would like to be able to do this in one cell. I am able to compare
all the cells individually, but would rather compare the arrays as a whole.

For example:

Tab 1
Column A Column B Column C
----------- ----------- -----------
George 15 10/6/04

Tab 2
Column A Column B Column C
----------- ----------- -----------
George 15 10/6/04


Is there a formula that I can use to say examine these two arrays and say
"Correct" because they are exactly the same?



Tab 1
Column A Column B Column C
----------- ----------- -----------
George 15 10/6/04

Tab 2
Column A Column B Column C
----------- ----------- -----------
George 46 10/6/04


In this example, Column B on Tab 2 does not match Column B on Tab 1. This
would result in the two formulas not being equal. How can a formula in one
cell show that?

Any help would be greatly appreciated. Thanks.
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

=IF(tab1!A1&tab1!B1&tab1!C1=tab2!A1&tab2!B1&tab2!C 1,"","in")&"correct"

HTH
Jason
Atlanta, GA

"TangentMemory" wrote:

Is there a way to compare two arrays and output message if they are exactly
the same, and output a different message if there is a difference in the
array. I would like to be able to do this in one cell. I am able to compare
all the cells individually, but would rather compare the arrays as a whole.

For example:

Tab 1
Column A Column B Column C
----------- ----------- -----------
George 15 10/6/04

Tab 2
Column A Column B Column C
----------- ----------- -----------
George 15 10/6/04


Is there a formula that I can use to say examine these two arrays and say
"Correct" because they are exactly the same?



Tab 1
Column A Column B Column C
----------- ----------- -----------
George 15 10/6/04

Tab 2
Column A Column B Column C
----------- ----------- -----------
George 46 10/6/04


In this example, Column B on Tab 2 does not match Column B on Tab 1. This
would result in the two formulas not being equal. How can a formula in one
cell show that?

Any help would be greatly appreciated. Thanks.

  #3   Report Post  
Alan Beban
 
Posts: n/a
Default

If the functions in the freely downloadable file at
http:/home.pacbell.net/beban are available to your workbook, then either
of the following will return True or False:

=RowsEqual(Sheet4!A1:C1,Sheet5!A1:C1)

=ColumnsEqual(Sheet4!A1:C1,Sheet5!A1:C1)

Alan Beban

TangentMemory wrote:
Is there a way to compare two arrays and output message if they are exactly
the same, and output a different message if there is a difference in the
array. I would like to be able to do this in one cell. I am able to compare
all the cells individually, but would rather compare the arrays as a whole.

For example:

Tab 1
Column A Column B Column C
----------- ----------- -----------
George 15 10/6/04

Tab 2
Column A Column B Column C
----------- ----------- -----------
George 15 10/6/04


Is there a formula that I can use to say examine these two arrays and say
"Correct" because they are exactly the same?



Tab 1
Column A Column B Column C
----------- ----------- -----------
George 15 10/6/04

Tab 2
Column A Column B Column C
----------- ----------- -----------
George 46 10/6/04


In this example, Column B on Tab 2 does not match Column B on Tab 1. This
would result in the two formulas not being equal. How can a formula in one
cell show that?

Any help would be greatly appreciated. Thanks.

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
Comparing two lists in excel that don't match exactly Tina Excel Worksheet Functions 2 May 11th 05 05:00 PM
How to use linest with variably sized data arrays? [email protected] Excel Worksheet Functions 0 April 13th 05 04:56 PM
Comparing Data in 2 columns suzb Excel Worksheet Functions 2 January 6th 05 03:39 AM
Comparing Arrays KL Excel Worksheet Functions 9 December 3rd 04 09:58 PM
Comparing Data in two columns Marianne Excel Worksheet Functions 3 November 5th 04 11:26 PM


All times are GMT +1. The time now is 11:53 PM.

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"