Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default how to use if and then in excel

I want to confirm that if a2 in sheet 1 is equal to b2 in sheet2 then a3 in
sheet1 should be equal to b3 in sheet2. I am trying to use the if and then
conditions for the same but i believe i dont know the right syntax to get
there.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default how to use if and then in excel

This should be placed in A3 of Sheet1:

=IF(A2=Sheet2!B2,Sheet2!B3,"")


--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"Satnam Randhawa" wrote in
message ...
I want to confirm that if a2 in sheet 1 is equal to b2 in sheet2 then a3 in
sheet1 should be equal to b3 in sheet2. I am trying to use the if and then
conditions for the same but i believe i dont know the right syntax to get
there.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default how to use if and then in excel

I'm assuming that you want this formula in A3 and if A2 in sheet 1 is not
equal to B2 in sheet 2 you want nothing displayed in the cell.

In A2 enter the following:

=IF(A2=Sheet2!B2,Sheet2!B3,"")

If you want a 0 (zero) in the cell replace the double quotes in the ELSE
clause of the IF with the number 0.
--
Kevin Backmann


"Satnam Randhawa" wrote:

I want to confirm that if a2 in sheet 1 is equal to b2 in sheet2 then a3 in
sheet1 should be equal to b3 in sheet2. I am trying to use the if and then
conditions for the same but i believe i dont know the right syntax to get
there.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 229
Default how to use if and then in excel

On Dec 26, 11:16 am, Satnam Randhawa
wrote:
I want to confirm that if a2 in sheet 1 is equal to b2 in sheet2 then a3 in
sheet1 should be equal to b3 in sheet2. I am trying to use the if and then
conditions for the same but i believe i dont know the right syntax to get
there.


In A3 on sheet1, use this formula:

=IF('Sheet1'!A2='Sheet2'!B2,'Sheet2'!B3)

If A2 on sheet 1 does not equal B2 on sheet 2, this formula will
return FALSE.
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default how to use if and then in excel

On Dec 26, 8:16*am, Satnam Randhawa
wrote:
I want to confirm that if a2 in sheet 1 is equal to b2 in sheet2 then a3 in
sheet1 should be equal to b3 in sheet2. I am trying to use the if and then
conditions for the same but i believe i dont know the right syntax to get
there.


It is unclear to me whether you want to set sheet1!a3 to sheet2!b3 if
conditions are met, or if you want verify ("confirm") that sheet1!a3
equals sheet2!b3 at the same time that sheet1!a2 equals sheet2!b2, as
you wrote. In other words, you want a TRUE or FALSE result. If the
latter, the following is one way:

=if(sheet1!a2 = sheet2!b2, if(sheet1!a3 = sheet2!b3, TRUE, FALSE), "")

or more simply:

=if(sheet1!a2 = sheet2!b2, (sheet1!a3 = sheet2!b3), "")

(The inner parentheses are unnecessary; they are there only to improve
readability.)

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 03:58 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"