View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Kevin B Kevin B is offline
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.