Multiple SUMIF functions

moon_

New Member
Joined
Jun 10, 2021
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
Hi,
I need help once again with my worksheet shown below.
Basically, Cell A2 is where you identify whether you want NONE (sum all clicks and orders) and Contains only (sum clicks and orders for search terms which contain specific keywords only under the Contains column). Using the formula I have now, if cell A2 is set to "Contains only", and there are no keywords under the the Contains column, total clicks and orders will show a value of 0. Is there any to make it add all clicks and keywords instead?
I hope I explained this well enough. Any help will be appreciated. Thank you!

sample1.xlsx
ABCDE
1TypeTotal ClicksTotal OrdersACFS
2None97313.13
3
4Customer Search TermClicksOrdersContainscontains found?
5lip liner247not found
6eye liners for women63not found
7maybelline393not found
8lines under eye treatment22not found
9maybelline primer52not found
10almay makeup for underline puffiness and dark circles11not found
11black gel liner11not found
12bright gel white eyeliner11not found
13concealer maybelline21not found
14corrector de ojeras maybelline41not found
15eye mask fine lines11not found
16eye mask for lines under eyes11not found
17eye patch lines11not found
18eye patches for fine lines and tired eyes11not found
19eye patches for puffiness and fine lines11not found
20eye treatment fine lines11not found
21eyebrow tint maybelline peel off11not found
22hydro liner11not found
23instant eraser maybelline41not found
Sheet1 (2)
Cell Formulas
RangeFormula
B2:C2B2=IF($A$2="None",SUBTOTAL(109,B5:B99999),IF($A$2="Contains only",SUMIF($E$5:$E$99999,"=found",B5:B99999),IF($A$2="Does not contain only",SUMIF(#REF!,"=found",B5:B99999),SUMIF(#REF!,"=Valid",B5:B99999))))
D2D2=B2/C2
E5:E23E5=IF(A5="","",IF(SUMPRODUCT((D$5:D$9999<>"")*(ISNUMBER(SEARCH(D$5:D$9999,A5))))>0,"found","not found"))
Cells with Data Validation
CellAllowCriteria
A2ListNone, Contains only
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Sorry, this is the correct table:

sample1.xlsx
ABCDE
1TypeTotal ClicksTotal OrdersACFS
2None97313.13
3
4Customer Search TermClicksOrdersContainscontains found?
5lip liner247not found
6eye liners for women63not found
7maybelline393not found
8lines under eye treatment22not found
9maybelline primer52not found
10almay makeup for underline puffiness and dark circles11not found
11black gel liner11not found
12bright gel white eyeliner11not found
13concealer maybelline21not found
14corrector de ojeras maybelline41not found
15eye mask fine lines11not found
16eye mask for lines under eyes11not found
17eye patch lines11not found
18eye patches for fine lines and tired eyes11not found
19eye patches for puffiness and fine lines11not found
20eye treatment fine lines11not found
21eyebrow tint maybelline peel off11not found
22hydro liner11not found
23instant eraser maybelline41not found
Sheet1 (2)
Cell Formulas
RangeFormula
B2:C2B2=IF($A$2="None",SUBTOTAL(109,B5:B99999),IF($A$2="Contains only",SUMIF($E$5:$E$99999,"=found",B5:B99999)))
D2D2=B2/C2
E5:E23E5=IF(A5="","",IF(SUMPRODUCT((D$5:D$9999<>"")*(ISNUMBER(SEARCH(D$5:D$9999,A5))))>0,"found","not found"))
Cells with Data Validation
CellAllowCriteria
A2ListNone, Contains only
 
Upvote 0
How about
Excel Formula:
=IF(OR($A$2="None",COUNTIF(D5:D99999,"<>")=0),SUBTOTAL(109,B5:B99999),IF($A$2="Contains only",SUMIF($E$5:$E$99999,"=found",B5:B99999)))
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

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