excel.365 if column D="text" and column O=positive number then sum

copperwasher

Board Regular
Joined
Mar 1, 2016
Messages
65
Office Version
  1. 365
Platform
  1. Windows
Hi there Excel guru's

I have a report which is pasted into a spreadsheet (image attached)
The cells have been set to the appropriate setting

Column D contains either
buy
sell
balance

Column O
positive numbers
negative numbers

At the top of the pasted sheet I have summary calcs
I have the totals for the buy and sell values using =sumif(D7:D15000,"buy",o7 : O15000) and sell respectively

I am looking to "sum" the following individually
buy negative numbers
buy positive numbers
and
sell negative numbers
sell positive numbers

I have attempted the solution using:
1. =SUMIFS(D7:D15000,O7:O15000,"buy"&F1&">0") This fails and produces 0
2. =SUMPRODUCT(--((ISNUMBER(SEARCH("buy",D7:D15000)))>0),O7:O15000) this also fails and produces -10879. which is odd as the calc contains >0

As always, your help and guidance is much appreciated

Copperwasher
 

Attachments

  • E3.PNG
    E3.PNG
    80.7 KB · Views: 9

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
14,786
Office Version
  1. 365
Platform
  1. Windows
Sumifs will work if written correctly.
Excel Formula:
=SUMIFS(O7:O15000,D7:D15000,"buy",O7:O15000,">0")
 
Solution

copperwasher

Board Regular
Joined
Mar 1, 2016
Messages
65
Office Version
  1. 365
Platform
  1. Windows
Sumifs will work if written correctly.
Excel Formula:
=SUMIFS(O7:O15000,D7:D15000,"buy",O7:O15000,">0")
Jasonb75... that works perfectly.

I did look at sumifs... but didn't arrive at your suggestion
Lessons learned

Thank you
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,532
Messages
5,854,288
Members
431,636
Latest member
shabbas313

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
Top