Look up by 2 values

currybai

Board Regular
Joined
Jul 14, 2008
Messages
202
I have the following columns,

Goal Status which is either Not at Goal or At Goal
Run Status which is either Behind or Ahead

I want to do a summary table like :

<table border="0" cellpadding="0" cellspacing="0" width="221"><col style="width: 78pt;" width="104"> <col style="width: 50pt;" width="67"> <col style="width: 38pt;" width="50"> <tbody><tr style="height: 12pt;" height="16"> <td class="xl65" style="height: 12pt; width: 78pt;" width="104" height="16">Overall</td> <td class="xl65" style="border-left: medium none; width: 50pt;" width="67">Pacing</td> <td class="xl65" style="border-left: medium none; width: 38pt;" width="50">
</td> </tr> <tr style="height: 12pt;" height="16"> <td class="xl66" style="height: 12pt; border-top: medium none;" height="16">Not At Goal</td> <td class="xl67" style="border-top: medium none;">Behind</td> <td class="xl68" style="border-top: medium none;"> </td> </tr> <tr style="height: 12pt;" height="16"> <td class="xl69" style="height: 12pt;" height="16"> </td> <td class="xl70">Ahead</td> <td class="xl71"> </td> </tr> <tr style="height: 12pt;" height="16"> <td class="xl66" style="height: 12pt; border-top: medium none;" height="16">At Goal</td> <td class="xl67" style="border-top: medium none;">Behind</td> <td class="xl68" style="border-top: medium none;"> </td> </tr> <tr style="height: 12pt;" height="16"> <td class="xl69" style="height: 12pt;" height="16"> </td> <td class="xl70">Ahead</td> <td class="xl71"> </td> </tr> </tbody></table>I basically want the number of not at goal and behind, not at goal and ahead, etc
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Have you considering using a pivot table? It sounds me like that would work the best.

I tried but I cant get it to look like how I want it to look like because the Overall portion is 1 column, and I also want to show if it hit goal in the last month so I have a separate column for Last month. So really it looks like


<table border="0" cellpadding="0" cellspacing="0" width="221"><tbody><tr style="height: 12pt;" height="16"><td class="xl65" style="height: 12pt; width: 78pt;" width="104" height="16"> <table border="0" cellpadding="0" cellspacing="0" width="524"><col style="width: 69pt;" width="92" span="5"> <col style="width: 48pt;" width="64"> <tbody><tr style="height: 12pt;" height="16"> <td style="height: 12pt; width: 69pt;" width="92" height="16">
</td> <td style="width: 69pt;" width="92">
</td> <td style="width: 69pt;" width="92">
</td> <td style="width: 69pt;" width="92">
</td> <td style="width: 69pt;" width="92">
</td> <td style="width: 48pt;" width="64">
</td> </tr> <tr style="height: 12pt;" height="16"> <td style="height: 12pt;" height="16">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 12pt;" height="16"> <td style="height: 12pt;" height="16">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 12pt;" height="16"> <td style="height: 12pt;" height="16">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 12pt;" height="16"> <td style="height: 12pt;" height="16">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> </tbody></table></td> <td class="xl65" style="border-left: medium none; width: 50pt;" width="67">
</td> <td class="xl65" style="border-left: medium none; width: 38pt;" width="50">
</td> </tr> <tr style="height: 12pt;" height="16"> <td class="xl66" style="height: 12pt; border-top: medium none;" height="16">
</td> <td class="xl67" style="border-top: medium none;">
</td> <td class="xl68" style="border-top: medium none;">
</td> </tr> <tr style="height: 12pt;" height="16"> <td class="xl69" style="height: 12pt;" height="16">
</td> <td class="xl70">
</td> <td class="xl71">
</td> </tr> <tr style="height: 12pt;" height="16"> <td class="xl66" style="height: 12pt; border-top: medium none;" height="16">
</td> <td class="xl67" style="border-top: medium none;">
</td> <td class="xl68" style="border-top: medium none;">
</td> </tr> <tr style="height: 12pt;" height="16"> <td class="xl69" style="height: 12pt;" height="16">


</td> <td class="xl70">
</td></tr></tbody></table> <table border="0" cellpadding="0" cellspacing="0" width="894"><col style="width: 112pt;" width="149" span="6"> <tbody><tr style="height: 12pt;" height="16"> <td style="height: 12pt; width: 112pt;" width="149" height="16">Overall</td> <td style="width: 112pt;" width="149">Pacing</td> <td style="width: 112pt;" width="149">#</td> <td style="width: 112pt;" width="149">Last Month</td> <td style="width: 112pt;" width="149">Pacing</td> <td style="width: 112pt;" width="149">#</td> </tr> <tr style="height: 12pt;" height="16"> <td style="height: 12pt;" height="16">Not at goal</td> <td>ahead</td> <td>
</td> <td>Not at goal</td> <td>ahead</td> <td>
</td> </tr> <tr style="height: 12pt;" height="16"> <td style="height: 12pt;" height="16">
</td> <td>behind</td> <td>
</td> <td>
</td> <td>behind</td> <td>
</td> </tr> <tr style="height: 12pt;" height="16"> <td style="height: 12pt;" height="16">at goal</td> <td>ahead</td> <td>
</td> <td>at goal</td> <td>ahead</td> <td>
</td> </tr> <tr style="height: 12pt;" height="16"> <td style="height: 12pt;" height="16">
</td> <td>behind</td> <td>
</td> <td>
</td> <td>behind</td> <td>
</td> </tr> </tbody></table>
 
Upvote 0
Not knowing your column headings you could try a SUMPRODUCT:

=SUMPRODUCT(--(RANGE="Not a goal"),--(RANGE="Ahead"))

Where the first RANGE is the range of cells that contain "Not a goal" or "at goal"
Where the second Range is the range of cells that contain "ahead" or "behind"

Effectively what SUMPRODUCT will return is a count of the number of matches to the criteria.
 
Upvote 0

Forum statistics

Threads
1,224,541
Messages
6,179,418
Members
452,912
Latest member
alicemil

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