ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to use if and then in excel (https://www.excelbanter.com/excel-discussion-misc-queries/170749-how-use-if-then-excel.html)

Satnam Randhawa[_2_]

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.

RagDyeR

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.



Kevin B

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.


iliace

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.

joeu2004

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.






All times are GMT +1. The time now is 08:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com