Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Man
 
Posts: n/a
Default Compare cell value

In an excel sheet, say we have some set values in A2 to A50 and B2 to B50 and
C2 to C29. Now we need to compare say A30 onwards to cell values A2 to A29
and B30 onwards to B2 to B29 and if both values found then the row in which
both value found, the value in column C will be the value in the C column of
cells C30 onwards. Hope this example explains the problem clearly.
  #2   Report Post  
Max
 
Posts: n/a
Default

One way ..

Put in the formula bar for C30,
and array-enter, i.e. press CTRL+SHIFT+ENTER:

=IF(ISNA(MATCH(A30&"_"&B30,$A$2:$A$29&"_"&$B$2:$B$ 29,0)),"",INDEX($C$2:$C$29
,MATCH(A30&"_"&B30,$A$2:$A$29&"_"&$B$2:$B$29,0)))

Copy C30 down to C50

Unmatched cases, if any, will return blanks: "" instead of #N/As
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Man" wrote in message
...
In an excel sheet, say we have some set values in A2 to A50 and B2 to B50

and
C2 to C29. Now we need to compare say A30 onwards to cell values A2 to A29
and B30 onwards to B2 to B29 and if both values found then the row in

which
both value found, the value in column C will be the value in the C column

of
cells C30 onwards. Hope this example explains the problem clearly.



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

Is it just?

=IF(AND(A30=A2,B30=B2),C2,""_

and copy down.

--
HTH

Bob Phillips

"Man" wrote in message
...
In an excel sheet, say we have some set values in A2 to A50 and B2 to B50

and
C2 to C29. Now we need to compare say A30 onwards to cell values A2 to A29
and B30 onwards to B2 to B29 and if both values found then the row in

which
both value found, the value in column C will be the value in the C column

of
cells C30 onwards. Hope this example explains the problem clearly.



  #4   Report Post  
Man
 
Posts: n/a
Default

Thanks Max ... formula works perfectly ...thanks a ton !!!

"Max" wrote:

One way ..

Put in the formula bar for C30,
and array-enter, i.e. press CTRL+SHIFT+ENTER:

=IF(ISNA(MATCH(A30&"_"&B30,$A$2:$A$29&"_"&$B$2:$B$ 29,0)),"",INDEX($C$2:$C$29
,MATCH(A30&"_"&B30,$A$2:$A$29&"_"&$B$2:$B$29,0)))

Copy C30 down to C50

Unmatched cases, if any, will return blanks: "" instead of #N/As
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Man" wrote in message
...
In an excel sheet, say we have some set values in A2 to A50 and B2 to B50

and
C2 to C29. Now we need to compare say A30 onwards to cell values A2 to A29
and B30 onwards to B2 to B29 and if both values found then the row in

which
both value found, the value in column C will be the value in the C column

of
cells C30 onwards. Hope this example explains the problem clearly.




  #5   Report Post  
Man
 
Posts: n/a
Default

Sorry Bob, guess I was not able to explaing my problem correctly. Let me try
it again, I want to compare all the rows above 30 with all the rows following
30 for columns A and B. Whichever cell matches the value in column C has to
be written to the column C of the row 30 and greater.
Anyways, the posting by Max has the solution to my question. Thank you for
replying.

"Bob Phillips" wrote:

Is it just?

=IF(AND(A30=A2,B30=B2),C2,""_

and copy down.

--
HTH

Bob Phillips

"Man" wrote in message
...
In an excel sheet, say we have some set values in A2 to A50 and B2 to B50

and
C2 to C29. Now we need to compare say A30 onwards to cell values A2 to A29
and B30 onwards to B2 to B29 and if both values found then the row in

which
both value found, the value in column C will be the value in the C column

of
cells C30 onwards. Hope this example explains the problem clearly.






  #6   Report Post  
Max
 
Posts: n/a
Default

Glad to hear that !
Thanks for the feedback ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Man" wrote in message
...
Thanks Max ... formula works perfectly ...thanks a ton !!!



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 data - one cell to multiple cells srs710 Excel Discussion (Misc queries) 1 July 20th 05 11:43 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


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