#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default IF and Then in Excel

I am trying to compare two different cells in two different worksheets.

If the value in A1 in sheet1 is in any of the cells in in sheet2, then value
in B1 in sheet1 should be equal to value in C1 in sheet2.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default IF and Then in Excel

On Dec 26, 8:31*am, Satnam Randhawa
wrote:
I am trying to compare two different cells in two different worksheets.
If the value in A1 in sheet1 is in any of the cells in in sheet2, then value
in B1 in sheet1 should be equal to value in C1 in sheet2.


See the follow-ups to your similar posting in this same newsgroup.
The difference is: the first condition here is that sheet1!A1 is
equal to __any__ cell in sheet2. I don't know if the one posting is a
correction of the other, or if you are truly asking two different
questions.

It is unclear to me whether you want to set sheet1!b1 to sheet2!c1 if
conditions are met, or if you want verify ("confirm") that sheet1!b1
equals sheet2!c1 if conditions are met. In other words, you want a
TRUE or FALSE result. If the latter, the following array formula
(commit with ctrl+shift+Enter) is one way:

=if(or(Sheet1!!A1=Sheet2!A1:C3), (Sheet1!B1=Sheet2!C1), "")

Here, "any of the cells" in Sheet2 is assumed to be the range A1:C3.

That leaves the cell looking blank if the first condition is not met.
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



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