Sumifs+Index/Match+Lookup

Gcsingh90

New Member
Joined
Dec 6, 2022
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Table 2
MonthStatusRamKChetan
JanYes221
JanNo011
JanN/A323
FebYes211
FebNo121
FebN/A001

EXPECTED OUTPUT FROM TABLE 2

Table 3
MonthNameYes+NoYes%
JanRam22
JanK32
JanChetan21
FebRam32
FebK31
FebChetan21

I am trying to count the sum of yes+no in table from table per person when the criteria of month and name matches. I tried to use sumif. Kindly help.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
This can be done in Power Query pretty quickly:


let
Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Month", type text}, {"Status", type text}, {"Ram", Int64.Type}, {"K", Int64.Type}, {"Chetan", Int64.Type}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Month", "Status"}, "Attribute", "Value"),
#"Pivoted Column" = Table.Pivot(#"Unpivoted Columns", List.Distinct(#"Unpivoted Columns"[Status]), "Status", "Value", List.Sum),
#"Added Custom" = Table.AddColumn(#"Pivoted Column", "Yes & No", each [Yes]+[No]),
#"Reordered Columns" = Table.ReorderColumns(#"Added Custom",{"Month", "Attribute", "Yes & No", "N/A"}),
#"Removed Columns" = Table.RemoveColumns(#"Reordered Columns",{"No"}),
#"Added Custom1" = Table.AddColumn(#"Removed Columns", "Custom", each ([#"Yes & No"])/([#"Yes & No"]+[#"N/A"])),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom1",{{"Custom", Percentage.Type}}),
#"Removed Columns1" = Table.RemoveColumns(#"Changed Type1",{"N/A"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns1",{{"Custom", "Pct"}}),
#"Reordered Columns1" = Table.ReorderColumns(#"Renamed Columns",{"Month", "Attribute", "Yes & No", "Yes", "Pct"})
in
#"Reordered Columns1"




Book1
ABCDEFGHIJKL
1Table 2
2
3MonthStatusRamKChetan
4JanYes221
5JanNo011
6JanN/A323
7FebYes211
8FebNo121
9FebN/A001
10
11EXPECTED OUTPUT FROM TABLE 2
12
13Table 3MonthAttributeYes & NoYesPct
14JanRam2240.00%
15MonthNameYes+NoYes%JanK3260.00%
16JanRam22JanChetan2140.00%
17JanK32FebRam32100.00%
18JanChetan21FebK31100.00%
19FebRam32FebChetan2166.67%
20FebK31
21FebChetan21
22
23
Sheet2
 
Upvote 0
A formula option
Fluff.xlsm
ABCDEFGHIJ
1MonthStatusRamKChetanMonthNameYes+NoYes
2JanYes221JanRam22
3JanNo011JanK32
4JanN/A323JanChetan21
5FebYes211FebRam32
6FebNo121FebK31
7FebN/A001FebChetan21
Data
Cell Formulas
RangeFormula
I2:I7I2=SUM(SUMIFS(XLOOKUP(H2,$C$1:$E$1,$C$2:$E$7),$A$2:$A$7,G2,$B$2:$B$7,{"yes","no"}))
J2:J7J2=SUMIFS(XLOOKUP(H2,$C$1:$E$1,$C$2:$E$7),$A$2:$A$7,G2,$B$2:$B$7,"yes")
 
Upvote 0
Solution

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

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