converting input table to output table using formulas

SRana

New Member
Joined
Dec 5, 2018
Messages
8
Hi,

i have an input table which i want to convert to the output table using Dynamic Formulas/Functions.. Request help on this..

Input Table: (X1..X9 represent column headers)

[TABLE="width: 553"]
<colgroup><col><col span="3"><col><col span="2"><col><col></colgroup><tbody>[TR]
[TD]X1[/TD]
[TD]X2[/TD]
[TD]X3[/TD]
[TD]X4[/TD]
[TD]X5[/TD]
[TD]X6[/TD]
[TD]X7[/TD]
[TD]X8[/TD]
[TD]X9[/TD]
[/TR]
[TR]
[TD]NQ[/TD]
[TD]Selected L1[/TD]
[TD]NQ[/TD]
[TD]L2[/TD]
[TD]NQ[/TD]
[TD]L3[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[/TR]
[TR]
[TD]L5[/TD]
[TD]L2[/TD]
[TD]NQ[/TD]
[TD]Selected L1[/TD]
[TD]L4[/TD]
[TD]L6[/TD]
[TD]L3[/TD]
[TD]NQ[/TD]
[TD]L7[/TD]
[/TR]
[TR]
[TD]L3[/TD]
[TD]NQ[/TD]
[TD]L2[/TD]
[TD]L4[/TD]
[TD]NQ[/TD]
[TD]L5[/TD]
[TD]Selected L1[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[/TR]
[TR]
[TD]L3[/TD]
[TD]NQ[/TD]
[TD]Selected L1[/TD]
[TD]L2[/TD]
[TD]NQ[/TD]
[TD]L4[/TD]
[TD]NQ[/TD]
[TD]L5[/TD]
[TD]NQ[/TD]
[/TR]
[TR]
[TD]L2[/TD]
[TD]L7[/TD]
[TD]Selected L1[/TD]
[TD]L3[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]L4[/TD]
[TD]L5[/TD]
[TD]L6[/TD]
[/TR]
[TR]
[TD]L2[/TD]
[TD]NQ[/TD]
[TD]Selected L1[/TD]
[TD]L3[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[/TR]
[TR]
[TD]L4[/TD]
[TD]L3[/TD]
[TD]NQ[/TD]
[TD]L2[/TD]
[TD]L5[/TD]
[TD]Selected L1[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[/TR]
[TR]
[TD]Selected L1[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]L3[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]L2[/TD]
[/TR]
[TR]
[TD]L4[/TD]
[TD]NQ[/TD]
[TD]L2[/TD]
[TD]Selected L1[/TD]
[TD]L3[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[/TR]
[TR]
[TD]L2[/TD]
[TD]NQ[/TD]
[TD]L5[/TD]
[TD]Selected L1[/TD]
[TD]L4[/TD]
[TD]L6[/TD]
[TD]NQ[/TD]
[TD]L3[/TD]
[TD]NQ[/TD]
[/TR]
[TR]
[TD]L2[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]Selected L1[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]L3[/TD]
[TD]NQ[/TD]
[TD]L4[/TD]
[/TR]
[TR]
[TD]L2[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]L3[/TD]
[TD]NQ[/TD]
[TD]Selected L1[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[TD]NQ[/TD]
[/TR]
</tbody>[/TABLE]


Output Table: Output table throws out results for count against each vendor for every field

[TABLE="width: 312"]
<colgroup><col><col><col span="6"><col></colgroup><tbody>[TR]
[TD]Vendor[/TD]
[TD]Selected L1[/TD]
[TD]L2[/TD]
[TD]L3[/TD]
[TD]L4[/TD]
[TD]L5[/TD]
[TD]L6[/TD]
[TD]L7[/TD]
[TD]NQ[/TD]
[/TR]
[TR]
[TD]X1[/TD]
[TD]1[/TD]
[TD]5[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]X2[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]1[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]X3[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]X4[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]X5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]X6[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]X7[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]X8[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]1[/TD]
[TD] [/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]X9[/TD]
[TD] [/TD]
[TD]1[/TD]
[TD] [/TD]
[TD]1[/TD]
[TD] [/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]8[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Welcome to the forum.

As you may have noticed, COUNTIFS chokes on arrays. This will do it though. Copy the B16 formula across and down.

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]
Book1
ABCDEFGHI
1X1X2X3X4X5X6X7X8X9
2NQSelected L1NQL2NQL3NQNQNQ
3L5L2NQSelected L1L4L6L3NQL7
4L3NQL2L4NQL5Selected L1NQNQ
5L3NQSelected L1L2NQL4NQL5NQ
6L2L7Selected L1L3NQNQL4L5L6
7L2NQSelected L1L3NQNQNQNQNQ
8L4L3NQL2L5Selected L1NQNQNQ
9Selected L1NQNQL3NQNQNQNQL2
10L4NQL2Selected L1L3NQNQNQNQ
11L2NQL5Selected L1L4L6NQL3NQ
12L2NQNQSelected L1NQNQL3NQL4
13L2NQNQL3NQSelected L1NQNQNQ
14
15VendorSelected L1L2L3L4L5L6L7NQ
16X115221001
17X211100018
18X332001006
19X443410000
20X500121008
21X620111205
22X710210008
23X800102009
24X901010118
Sheet54
Cell Formulas
RangeFormula
B16=SUMPRODUCT(($A16=$A$1:$I$1)*($A$2:$I$13=B$15))
[/FONT]
 
Upvote 0
That's super. You're welcome.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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