Multiple Creitera

josros60

Well-known Member
Joined
Jun 27, 2010
Messages
786
Office Version
  1. 365
Hi,

what formula can I use for the data below, wan to find Sage ID and Account reference and get the amount $ for it.

here is the data:

[TABLE="width: 334"]
<tbody>[TR]
[TD]SAGE
ID[/TD]
[TD]Type[/TD]
[TD]Account
Reference[/TD]
[TD]Gross[/TD]
[/TR]
[TR]
[TD]100016[/TD]
[TD]NorthwesTel[/TD]
[TD]8327204[/TD]
[TD="align: right"]5794.25[/TD]
[/TR]
[TR]
[TD]100016[/TD]
[TD]NorthwesTel[/TD]
[TD]8327205[/TD]
[TD="align: right"]7705.03[/TD]
[/TR]
[TR]
[TD]100016[/TD]
[TD]NorthwesTel[/TD]
[TD]8335419[/TD]
[TD="align: right"]3435.22[/TD]
[/TR]
[TR]
[TD]100016[/TD]
[TD]NorthwesTel[/TD]
[TD]8092[/TD]
[TD="align: right"]750.07[/TD]
[/TR]
</tbody>[/TABLE]


Thanks.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
If the Sage ID/Account Reference combination is unique, then this will work:


Book1
ABCDEFGH
1SAGETypeAccountGrossSage IDAccount RefGross
2IDReference10001683354193435.22
3100016NorthwesTel83272045794.25
4100016NorthwesTel83272057705.03
5100016NorthwesTel83354193435.22
6100016NorthwesTel8092750.07
Sheet4
Cell Formulas
RangeFormula
H2=SUMIFS(D3:D6,A3:A6,F2,C3:C6,G2)
 
Upvote 0
Hi,

Tried but give me an error #VALUE !

Formula:

=SUMIFS(AUGUST[Aug],AUGUST[SAGEID],A3,C3,AUGUST[AccountNumber])

thanks,
 
Upvote 0
You've got the parameters in the wrong order somehow. If A3 has the SageId, and C3 has the account number, and the Aug column has the totals, then it should be:

=SUMIFS(AUGUST[Aug],AUGUST[SAGEID],A3,AUGUST[AccountNumber],C3)


It seems a bit odd to have a column named Aug in a table named AUGUST. Do you mean:

=SUMIFS(AUGUST[Gross],AUGUST[SAGEID],A3,AUGUST[AccountNumber],C3)


https://support.office.com/en-us/article/sumifs-function-c9e748f5-7ea7-455d-9406-611cebce642b
 
Upvote 0
Sorry,

the column is not named August is the tab (sheet) have 12 tabs with each month.
 
Upvote 0
Now I'm confused. In your post 3, you showed a formula using table syntax, so I assumed you had a table named August, with column headings Aug, SAGEID, and AccountNumber. Now you say the sheet is named August? In order to refer to data on another sheet, the format is:

=SUMIFS(August!D3:D6,August!A3:A6,A3,August!C3:C6,C3)

where the ranges with sheet names go to another sheet, and the ones without the sheet names belong on the current sheet (the sheet with the formula). So in order to get your formula to work, I need to know where the lookup data is, and where the values are that you're looking for. Are they in a table? In a fixed range? An open-ended range? A defined Name? Do you want to just search the August sheet, or all 12 sheets?
 
Upvote 0
This what I have

12 sheets with all vendors

each month has for example

Jun and July column to compare two month and COGS (cost of good gross) what I want when type the Month data automatically goes to to COGS Tab.

This is summarty tab (COGS)

A
[TABLE="width: 1102"]
<colgroup><col><col><col><col span="2"><col><col><col><col><col><col span="2"></colgroup><tbody>[TR]
[TD]SAGE
ID[/TD]
[TD]Type[/TD]
[TD]Account
Reference[/TD]
[TD] [/TD]
[TD]Date[/TD]
[TD]Mail/Online/Email[/TD]
[TD]GL/DIST CODE[/TD]
[TD]Notes[/TD]
[TD]$ Gross[/TD]
[TD]Jul-19[/TD]
[TD]Aug-19[/TD]
[TD]Sep-19[/TD]
[/TR]
[TR]
[TD]100215[/TD]
[TD]ABC Communications[/TD]
[TD]17786-28380[/TD]
[TD] [/TD]
[TD]1ST[/TD]
[TD]Mail [/TD]
[TD]TOWLEA[/TD]
[TD] [/TD]
[TD="align: right"]1,344.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]525.00[/TD]
[TD="align: right"]0.00[/TD]
[/TR]
[TR]
[TD]100215[/TD]
[TD]ABC Communications[/TD]
[TD]17786-28620[/TD]
[TD] [/TD]
[TD]1ST[/TD]
[TD]Mail [/TD]
[TD]TOWLEA[/TD]
[TD] [/TD]
[TD="align: right"]1,044.75[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[/TR]
[TR]
[TD]100215[/TD]
[TD]ABC Communications[/TD]
[TD]30862[/TD]
[TD] [/TD]
[TD]1ST[/TD]
[TD]Mail [/TD]
[TD]TOWLEA[/TD]
[TD] [/TD]
[TD="align: right"]414.75[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]655.00[/TD]
[TD="align: right"]0.00[/TD]
[/TR]
[TR]
[TD]100109[/TD]
[TD]AFX Cpmmunications[/TD]
[TD]80017[/TD]
[TD] [/TD]
[TD]1ST[/TD]
[TD]Mail [/TD]
[TD]CLESER[/TD]
[TD] [/TD]
[TD="align: right"]152.69[/TD]
[TD="align: right"]115.89[/TD]
[TD="align: right"]0.00[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]100053[/TD]
[TD]Allstream[/TD]
[TD]1284630[/TD]
[TD] [/TD]
[TD]1st[/TD]
[TD]Online[/TD]
[TD]ALL463[/TD]
[TD] [/TD]
[TD="align: right"]4,644.06[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]100053[/TD]
[TD]Allstream[/TD]
[TD]10000164982[/TD]
[TD] [/TD]
[TD]1ST[/TD]
[TD]Online[/TD]
[TD]ALL498[/TD]
[TD] [/TD]
[TD="align: right"]699.45[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]


and here is the month tab sample:

[TABLE="width: 660"]
<colgroup><col><col><col><col span="2"></colgroup><tbody>[TR]
[TD]SAGE
ID[/TD]
[TD="align: left"]
clip_image002.png
Vendor
Name

<tbody>
</tbody>
[/TD]
[TD]Account
Number[/TD]
[TD] Jul [/TD]
[TD] Aug [/TD]
[/TR]
[TR]
[TD]100210[/TD]
[TD]0875942 BC Limited[/TD]
[TD][/TD]
[TD] - [/TD]
[TD][/TD]
[/TR]
[TR]
[TD]100306[/TD]
[TD]A2B Delivery Service[/TD]
[TD][/TD]
[TD] - [/TD]
[TD][/TD]
[/TR]
[TR]
[TD]100215[/TD]
[TD]ABC Communications[/TD]
[TD]17786-28380[/TD]
[TD] - [/TD]
[TD] 525.00[/TD]
[/TR]
[TR]
[TD]100215[/TD]
[TD]ABC Communications[/TD]
[TD]17786-28620[/TD]
[TD] - [/TD]
[TD][/TD]
[/TR]
[TR]
[TD]100215[/TD]
[TD]ABC Communications[/TD]
[TD]30862[/TD]
[TD] - [/TD]
[TD] 655.00[/TD]
[/TR]
[TR]
[TD]100128[/TD]
[TD]Abstractive Technologies Consulting[/TD]
[TD][/TD]
[TD] - [/TD]
[TD][/TD]
[/TR]
[TR]
[TD]100164[/TD]
[TD]ADP CANADA CO.[/TD]
[TD][/TD]
[TD] - [/TD]
[TD][/TD]
[/TR]
[TR]
[TD]100037[/TD]
[TD]AEBC Internet Corp. (AE170403-6455)[/TD]
[TD][/TD]
[TD] - [/TD]
[TD][/TD]
[/TR]
[TR]
[TD]100109[/TD]
[TD]AFX Communications[/TD]
[TD][/TD]
[TD] 115.89[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]100176[/TD]
[TD]AIRESPRING[/TD]
[TD]1352791[/TD]
[TD] - [/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

want to get the amount I type month tab to go to COGS TABLE
 
Upvote 0
OK, we're making some progress. On this example, you have July and August on the same sheet. So your JULY sheet has July and August? Your AUGUST sheet has August and September? So on your COGS sheet, do you want to take the August value from the JULY sheet or the AUGUST sheet?
 
Upvote 0
Yes, all same sheet and each tab (month) has two month comparison, ej. Jan will Have Dec and Jan, Feb will have Jan and Feb and the Summary called COGS (COST OF GOODS).
and want to take the total of the each tab name, example July tab will have Jun column and July column and COGS will take july from july tab respectively the rest of tabs.
 
Upvote 0
Assuming your July sheet looks like:


Book1
ABCDE
1SAGE IDVendor NameAccount NumberJulAug
21002100875942 BC Limited-
3100306A2B Delivery Service-
4100215ABC Communications17786-28380-525
5100215ABC Communications17786-28620-
6100215ABC Communications30862-655
7100128Abstractive Technologies Consulting-
8100164ADP CANADA CO.-
9100037AEBC Internet Corp. (AE170403-6455)-
10100109AFX Communications80017115.89
11100176AIRESPRING1352791-
July


And August looks like:


Book1
ABCDE
1SAGE IDVendor NameAccount NumberAugSep
21002100875942 BC Limited
3100306A2B Delivery Service
4100215ABC Communications17786-28380525
5100215ABC Communications17786-28620
6100215ABC Communications30862655
7100128Abstractive Technologies Consulting
8100164ADP CANADA CO.888
9100037AEBC Internet Corp. (AE170403-6455)999
10100109AFX Communications
11100176AIRESPRING1352791
August


Then on your COGS sheet you can use the following formula:


Book1
ABCDEFGHIJKL
1SAGE IDTypeAccount ReferenceDateMail/Online/EmailGL/DIST CODENotes$ Gross19-Jul19-Aug19-Sep
2100215ABC Communications17786-283801STMailTOWLEA1,344.0005250
3100215ABC Communications17786-286201STMailTOWLEA1,044.75000
4100215ABC Communications308621STMailTOWLEA414.7506550
5100109AFX Cpmmunications800171STMailCLESER152.69115.900
6100053Allstream12846301stOnlineALL4634,644.06000
7100053Allstream100001649821STOnlineALL498699.45000
COGS
Cell Formulas
RangeFormula
J2=SUMIFS(INDIRECT(TEXT(J$1,"mmmm")&"!D2:D100"),INDIRECT(TEXT(J$1,"mmmm")&"!A2:A100"),$A2,INDIRECT(TEXT(J$1,"mmmm")&"!C2:C100"),$C2)


Put it in J2, and copy it down and to the right as needed. Note that it assumes the the dates in J1:L1 are actual Excel dates.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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