Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Comparing rows


Hi all,

I need to compare two worksheets. It should be checked in such a way
that all the data in the first ROWin sheet 1 should be the same when
compared with the data in the range of sheet 2. It should not happen
that one cell in row 1 exists and the other does not. Also, the data is
not sorted and even if sorted, it would lead to no help. Can anyone
please help me on this please. I tried to use hlookup which compares
only the data in one cell.
In brief, the data in a row of sheet 1 should match with any COMPLETE
ROW in a range of sheet 2. Please help. I feel this can be done with
formulas but I just landed up in scratching my head. If done
with VB, then too, am much more than happy.
Your help is appreciated.

Thanks,
Praveen


--
praveen_khm
------------------------------------------------------------------------
praveen_khm's Profile: http://www.excelforum.com/member.php...o&userid=30364
View this thread: http://www.excelforum.com/showthread...hreadid=526091

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Comparing rows

=SUMPRODUCT(COUNTIF(Sheet1!1:1,Sheet2!3:3))

will count the matches from row 1 of sheet1 to row 3 of sheet2.

=SUMPRODUCT(COUNTIF(Sheet1!1:1,Sheet2!3:3))=CountA (Sheet1!1:1)

would indicate if all the cells matched.

=And(SUMPRODUCT(COUNTIF(Sheet1!1:1,Sheet2!3:3))=Co untA(Sheet1!1:1),CountA(Sheet1!1:1)=CountA(Sheet2! 3:3))

would indicate that all cells matched and the row in sheet2 didn't have
additional cells with values.

--
Regards,
Tom Ogilvy


"praveen_khm" wrote:


Hi all,

I need to compare two worksheets. It should be checked in such a way
that all the data in the first ROWin sheet 1 should be the same when
compared with the data in the range of sheet 2. It should not happen
that one cell in row 1 exists and the other does not. Also, the data is
not sorted and even if sorted, it would lead to no help. Can anyone
please help me on this please. I tried to use hlookup which compares
only the data in one cell.
In brief, the data in a row of sheet 1 should match with any COMPLETE
ROW in a range of sheet 2. Please help. I feel this can be done with
formulas but I just landed up in scratching my head. If done
with VB, then too, am much more than happy.
Your help is appreciated.

Thanks,
Praveen


--
praveen_khm
------------------------------------------------------------------------
praveen_khm's Profile: http://www.excelforum.com/member.php...o&userid=30364
View this thread: http://www.excelforum.com/showthread...hreadid=526091


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Comparing rows


Thanks Tom,

However, this gives the result only if it exists in the same row and
also I was looking for VB as I see that this is very time consuming and
it has taken almost 10 min and is still calculating. Is there any other
way out......

Regards,
Praveen


--
praveen_khm
------------------------------------------------------------------------
praveen_khm's Profile: http://www.excelforum.com/member.php...o&userid=30364
View this thread: http://www.excelforum.com/showthread...hreadid=526091

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Comparing rows

Obviously, there are many ways to solve specific problems.

--
Regards,
Tom Ogilvy


"praveen_khm" wrote:


Thanks Tom,

However, this gives the result only if it exists in the same row and
also I was looking for VB as I see that this is very time consuming and
it has taken almost 10 min and is still calculating. Is there any other
way out......

Regards,
Praveen


--
praveen_khm
------------------------------------------------------------------------
praveen_khm's Profile: http://www.excelforum.com/member.php...o&userid=30364
View this thread: http://www.excelforum.com/showthread...hreadid=526091


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 data in different rows Daniel Excel Worksheet Functions 4 July 8th 08 12:54 AM
comparing two rows, then highting? johnh Links and Linking in Excel 2 November 18th 05 09:29 AM
comparing rows and deletion sreedhar[_8_] Excel Programming 11 October 11th 05 02:57 AM
Comparing rows in three sheets wing Excel Programming 0 April 30th 04 05:07 PM
Comparing two rows mika.[_2_] Excel Programming 1 December 17th 03 06:27 PM


All times are GMT +1. The time now is 12:40 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"