Multiple If conditions to get the result

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello Guys

I am trying to write one single formula in cell K2 and drag it down the get the same result entered manually in cell I2. There is multiple If conditions in the formula. I have tried to explain by writing each condition separately so that you will understand what I am trying to achieve.
IF A2 ="Receipt", -F2…..IF A2 ="Payment", F2….IF A2= "Contra", if E2="",F2…….IF A2= "Contra", if E2<>-F2.
Please I need help to put all these conditions in one formula to enter in one cell. Columns A, E and F only are connected to the formula. Others are just extra columns of the data.
Query multiple if function.xlsx
ABCDEFGHIJK
1TYPEDATENo.PARTICULARSWithdrawalsReceiptsXXXXXResultEnter Formula Here
2Receipt02-04-20211April1000AAAA-1000
3Payment02-04-20212Friday2000BBBB2000
4Contra02-04-20213Cash3000CCCC3000
5Contra02-04-20214Cash4000DDDD-4000
QUERY
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi,

This should do what you want:

Book3.xlsx
ABCDEFGHIJK
1TYPEDATENo.PARTICULARSWithdrawalsReceiptsXXXXXResultEnter Formula Here
2Receipt4/2/20211April1000AAAA-1000-1000
3Payment4/2/20212Friday2000BBBB20002000
4Contra4/2/20213Cash3000CCCC30003000
5Contra4/2/20214Cash4000DDDD-4000-4000
Sheet902
Cell Formulas
RangeFormula
K2:K5K2=IF(OR(A2={"Receipt","Payment"}),E2-F2,IF(A2="Contra",-E2+F2,""))
 
Upvote 0
Solution
Hi,

This should do what you want:

Book3.xlsx
ABCDEFGHIJK
1TYPEDATENo.PARTICULARSWithdrawalsReceiptsXXXXXResultEnter Formula Here
2Receipt4/2/20211April1000AAAA-1000-1000
3Payment4/2/20212Friday2000BBBB20002000
4Contra4/2/20213Cash3000CCCC30003000
5Contra4/2/20214Cash4000DDDD-4000-4000
Sheet902
Cell Formulas
RangeFormula
K2:K5K2=IF(OR(A2={"Receipt","Payment"}),E2-F2,IF(A2="Contra",-E2+F2,""))
Perfect. Thanks Jtakw.
 
Upvote 0
You're welcome, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,288
Members
448,563
Latest member
MushtaqAli

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top