Multiple XlookUp Solution

Gcsingh90

New Member
Joined
Dec 6, 2022
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hi, I am trying to solve this with Xlookup, Countifs, and Sumifs. Table 1 is the Main data table. Table 2 is fetching data from Table 1. Table 2 counts the number of yes and no and N/A for each name by month from Table 1

Table 1
MonthDateRamKChetan
Jan1-JanYesYesNo
Jan7-JanN/ANoN/A
Jan4-JanYesYesN/A
Jan26-JanN/AN/AYes
Jan29-JanN/AN/AN/A
Feb21-FebYesNoYes
Feb22-FebYesYesN/A
Feb23-FebNoNoNo

Table 2 Required Output: As for Jan month "Yes" for Ram is the returning count of 2 for K is 2 and for Chetan is 1 respectively. I tried Xlookup with countifs but not sure where is the error.

Table 2
MonthStatusRamKChetan
JanYes221
JanNo011
JanN/A323
FebYes211
FebNo121
FebN/A001



Any help is appreciated. Thanks
 
Last edited by a moderator:

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
You have already got a solution for the table3 so I have removed that form this post, as it's a duplicate of your previous thread.
In future please do not duplicate your questions.
 
Upvote 0
To bet Table 2, I brought the Table 1 into Power Query and unpivoted the data to a normalized table and then was able to pivot the data to your expected results.

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Removed Columns" = Table.RemoveColumns(Source,{"Date"}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Removed Columns", {"Month"}, "Attribute", "Value")
in
    #"Unpivoted Other Columns"

Book1
ABCDEFGHIJKLMNOP
1MonthDateRamKChetanCount of AttributeColumn Labels
2Jan1-JanYesYesNoN/ANoYes
3Jan7-JanN/ANoN/ARow LabelsChetanKRamChetanKRamChetanKRam
4Jan4-JanYesYesN/AJan32311122
5Jan26-JanN/AN/AYesFeb1121112
6Jan29-JanN/AN/AN/A
7Feb21-FebYesNoYes
8Feb22-FebYesYesN/A
9Feb23-FebNoNoNo
Sheet1
 
Upvote 0
Solution
To bet Table 2, I brought the Table 1 into Power Query and unpivoted the data to a normalized table and then was able to pivot the data to your expected results.

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Removed Columns" = Table.RemoveColumns(Source,{"Date"}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Removed Columns", {"Month"}, "Attribute", "Value")
in
    #"Unpivoted Other Columns"

Book1
ABCDEFGHIJKLMNOP
1MonthDateRamKChetanCount of AttributeColumn Labels
2Jan1-JanYesYesNoN/ANoYes
3Jan7-JanN/ANoN/ARow LabelsChetanKRamChetanKRamChetanKRam
4Jan4-JanYesYesN/AJan32311122
5Jan26-JanN/AN/AYesFeb1121112
6Jan29-JanN/AN/AN/A
7Feb21-FebYesNoYes
8Feb22-FebYesYesN/A
9Feb23-FebNoNoNo
Sheet1

Thanks, can you help me with countifs and xlookup specifically. Data is not that clean like I provided.
 
Upvote 0

Forum statistics

Threads
1,215,103
Messages
6,123,103
Members
449,096
Latest member
provoking

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