Can I use sumif and if function together

Sarah7828

New Member
Joined
Oct 25, 2024
Messages
27
Office Version
  1. 2021
Hi


I have the following data

Column a Column b Column c

Debit. Credit
Journal 1 - 200



I have a table as follows on the same spreadsheet

Journal 1 Sumif(column a ,“journal 1”, column b)

However, as you can see there is no value in column b. if the return value is zero, then I need to sumif column c , but the return value needs to be negative as it is a credit

So the parameters I am trying to achieve is as follows to create a formula :

If there is no value in column b for journal 1, then the formula need to return the value in column c , but a negative value ie - 200

If there is a dollar value in column b for journal 1 , then it return a positive value ie 200 as it is a debit . Therefore , column c the value will be zero

If there is not value in column b and c for journal 1 , the return value will be zero


How do I amend my sumif function to consider the above parameters?

Thank you
 
Sorry, I am confused.

You don't have "money In" or "money out" in any cell in column T. And if t5 was equal to "money in", then there won't be a value in t5 to make negative. So your formula in Post #7 appears to make no sense.

Can you show us an example and the results you expect to see based on that example. Otherwise, we can only guess what you're trying to do.
 
Last edited:
Upvote 0
hi there

I really want to know how to combine these to function . Can it be done

I have come up with two separate functions need then combined in Cell W5


Formula 1 for “money out”


=If ( ISNUMBER(SEARCH(“Money Out”,Q5)>0,
-T5,””)

Formula 2 for “money in”

If(isnumber(search (“Money In”, R5)>0,U5,””)

Can you let me know how to combine the formulas
 
Upvote 0
hi there

I really want to know how to combine these to function . Can it be done

I have come up with two separate functions need then combined in Cell W5


Formula 1 for “money out”


=If ( ISNUMBER(SEARCH(“Money Out”,Q5)>0,
-T5,””)

Formula 2 for “money in”

If(isnumber(search (“Money In”, R5)>0,U5,””)

Can you let me know how to combine the formulas
I really only want to use a If fuction
 
Upvote 0
Do you mean like this (two choices)?

QRSTUVWX
5Money OutMoney In0.00202,470.97202,470.97202,470.97
6Money OutMoney In0.000.000.00
7Money OutMoney In0.001,010.101,010.101,010.10
8Money OutMoney In0.0013,832.2013,832.2013,832.20
9Money OutMoney In0.001,406.771,406.771,406.77
10Money OutMoney In103,683.96-103,683.96-103,683.96
11Money OutMoney In50,593.74-50,593.74-50,593.74
12Money Out11.00-11.00-11.00
13Money In55.0055.0055.00
14Money Out33.000.000.00
Sheet1
Cell Formulas
RangeFormula
W5:W14W5=(R5="Money In")*U5-(Q5="Money Out")*T5
X5:X14X5=IF(R5="Money In",U5)-IF(Q5="Money Out",T5)
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: If function not working
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Thank you . Just wanted an explanation when I can’t combine the formulas. That is all . I didn’t want any other formulas except the combination of the 2. And if it can’t be done just a small explanation of why
 
Upvote 0

Forum statistics

Threads
1,226,798
Messages
6,193,063
Members
453,773
Latest member
bclever07

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