Help with Sumifs formula

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
888
Office Version
  1. 365
Platform
  1. Windows
I have the below formula for the example pic of data:

="Value Invoiced: "&DOLLAR(SUMIFS(WOR[[#All],[Amount]],WOR[[#All],[Customer]],"<>Theirs",WOR[[#All],[Date Invoiced]],">="&GraphData!$F$2,WOR[[#All],[Date Invoiced]],"<="&GraphData!$F$1),0)

1592239242960.png


(Note the table is called WOR)

I was wondering how I could add one more condition. I only want to sum unique invoice numbers (not all of the duplicates). As you can see Invoice #17125 and 15556 repeats. With this formula I would get a total of $113,488.45 when what I need is $7,313.76.

Any help would be much appreciated.

Thank you :)

Carla
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Try this array formula:

Dante Amor
ABCDEFGH
1CustomerWorkOrderInvoice No.AmountDate Invoiced15-jun
2Ours20663212345106810-may16-mayValue Invoiced: $7,289
3Theirs2066331555614720-may
4Theirs2066341555614720-may
5Ours20663517125624510-jun
6Ours20663617125624510-jun
7Ours20663717125624510-jun
8Ours20663817125624510-jun
9Ours20663917125624510-jun
10Ours20664018888104425-may
11Ours20664118888104425-may
12Ours20664218888104425-may
13Ours20664329299200018-jun
GraphData
Cell Formulas
RangeFormula
H2H2="Value Invoiced: " & DOLLAR(SUM(IF(FREQUENCY(IF((Tabla3[Customer]<>"Theirs")*(Tabla3[Date Invoiced]>=GraphData!$F$2)*(Tabla3[Date Invoiced]<=GraphData!$F$1),MATCH(Tabla3[Invoice No.],Tabla3[Invoice No.],0)),ROW(Tabla3[Invoice No.])-ROW($D$2)+1),Tabla3[Amount])),0)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
You can also use SUMPRODUCT so you don't need the array entry:

Book5
ABCDEFG
1CustomerWorkOrderInvoice No.AmountDate Invoiced15-Jun
2Ours206634123451068.199-Jun16-May
3Theirs206633155561477-Jun
4Theirs206632155561477-JunValue Invoiced: $7,314
5Ours206628171256245.573-Jun
6Ours206627171256245.573-Jun
7Ours206626171256245.573-Jun
8Ours206625171256245.573-Jun
9Ours206624171256245.573-Jun
10Ours206623171256245.573-Jun
11Ours206622171256245.573-Jun
12Ours206621171256245.573-Jun
13Ours206620171256245.573-Jun
14Ours206619171256245.573-Jun
15Ours206618171256245.573-Jun
16Ours206616171256245.573-Jun
17Ours206615171256245.573-Jun
18Ours206614171256245.573-Jun
19Ours206613171256245.573-Jun
20Ours206612171256245.573-Jun
21Ours206611171256245.573-Jun
22Ours206610171256245.573-Jun
23Theirs206608148921044.7512-Jun
GraphData
Cell Formulas
RangeFormula
G4G4="Value Invoiced: "&DOLLAR(SUMPRODUCT(WOR[Amount],--(WOR[Customer]<>"Theirs"),--(WOR[Date Invoiced]>=GraphData!$F$2),--(WOR[Date Invoiced]<=GraphData!$F$1),--(MATCH(WOR[Invoice No.],WOR[Invoice No.],0)=ROW(WOR[Invoice No.])-ROW(INDEX(WOR[Invoice No.],1))+1)),0)
 
Upvote 0
Never mind. Figured out I was referencing the wrong page.

Thank you very much!
 
Upvote 0
Try this array formula:

Dante Amor
ABCDEFGH
1CustomerWorkOrderInvoice No.AmountDate Invoiced15-jun
2Ours20663212345106810-may16-mayValue Invoiced: $7,289
3Theirs2066331555614720-may
4Theirs2066341555614720-may
5Ours20663517125624510-jun
6Ours20663617125624510-jun
7Ours20663717125624510-jun
8Ours20663817125624510-jun
9Ours20663917125624510-jun
10Ours20664018888104425-may
11Ours20664118888104425-may
12Ours20664218888104425-may
13Ours20664329299200018-jun
GraphData
Cell Formulas
RangeFormula
H2H2="Value Invoiced: " & DOLLAR(SUM(IF(FREQUENCY(IF((Tabla3[Customer]<>"Theirs")*(Tabla3[Date Invoiced]>=GraphData!$F$2)*(Tabla3[Date Invoiced]<=GraphData!$F$1),MATCH(Tabla3[Invoice No.],Tabla3[Invoice No.],0)),ROW(Tabla3[Invoice No.])-ROW($D$2)+1),Tabla3[Amount])),0)
Press CTRL+SHIFT+ENTER to enter array formulas.


I modified your formula a little bit but I cannot seem to get it to work and receive a #N/A error and am not sure why.

Could you advise what I am missing?

{="WIP Value: " & DOLLAR(SUM(IF(FREQUENCY(IF((WOR[Customer Exclusions]<>"Internal")*(WOR[Warehouse Name]="WIP"),MATCH(WOR[Q/O Number],WOR[Q/O Number],0)),ROW(WOR[Q/O Number])-ROW($N$2)+1),WOR[Sub Total])),0)}

1592418620645.png
 
Upvote 0
In column T you have blank cells.
Try this:

varios 17jun2020.xlsm
ENTZAA
1Warehouse NameSub TotalQ/O NumberCustomer Exclusions
2WIP15014WIP Value: $650
3WIP15014
4WIP20015Internal
5WIP30016
6WIP20017
7WIP30016
8WIP
9WIP30016
10WIP
11WIP
Hoja17
Cell Formulas
RangeFormula
AA2AA2="WIP Value: " & DOLLAR(SUM(IF(FREQUENCY(IF((WOR[Customer Exclusions]<>"Internal")*(WOR[Warehouse Name]="WIP")*(WOR[Q/O Number]<>""),MATCH(WOR[Q/O Number],WOR[Q/O Number],0)),ROW(WOR[Q/O Number])-ROW($N$2)+1),WOR[Sub Total])),0)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,012
Messages
6,122,682
Members
449,091
Latest member
peppernaut

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