Embedding Multiple Conditions from Neighbor Cells in SUMPRODUCT

NicoloJ

New Member
Joined
Nov 3, 2020
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hi all,
I have the following table below, where I would like to perform a SUMPRODUCT on column "F" and "G", with two conditions:
- The corresponding cell in "D" column has to be empty
- The corresponding cell in "E" has to contain the string ".TO"

and an other SOMPRODUCT, but with corresponding cell in "E" not containing ".TO"....

So the answer should be:
- First formula : 210*47.68 = 10,012.8
- Second formula: 21*493.36 + 47*221.75 = 20,782.81

I am unable to get to the result, always having errors when I try to embed if statements...
Please let me know if you find the solution, and if it is possible.

1604409014476.png
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi & welcome to MrExcel.
If the .TO is always the last 3 characters, try
Excel Formula:
=SUMPRODUCT((D2:D10="")*(RIGHT(E2:E10,3)=".TO"),F2:F10,G2:G10)
=SUMPRODUCT((D2:D10="")*(RIGHT(E2:E10,3)<>".TO"),F2:F10,G2:G10)
 
Upvote 0
Solution
Hi & welcome to MrExcel.
If the .TO is always the last 3 characters, try
Excel Formula:
=SUMPRODUCT((D2:D10="")*(RIGHT(E2:E10,3)=".TO"),F2:F10,G2:G10)
=SUMPRODUCT((D2:D10="")*(RIGHT(E2:E10,3)<>".TO"),F2:F10,G2:G10)

Hi, it works wonderful!
Thanks a lot.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,947
Members
449,095
Latest member
nmaske

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