Referencing Value in "Column Groups" (INDEX MATCH..?)

Seansy

New Member
Joined
Dec 7, 2017
Messages
6
Jan
Jan
Jan
Feb
Feb
Feb
Mar
Mar
Mar
Subscribers
Leads
Customers
Subscribers
Leads
Customers
Subscribers
Leads
Customers
Homer
5
6
7
6
7
8
7
8
9
Lenny
6
7
8
7
8
9
8
9
10
Carl
7
8
9
8
9
10
9
10
11
Barney
3
2
1
4
3
2
2
1
0

<tbody>
</tbody>











Hi everyone,

I'm stuck on a project and may be missing something obvious.

I need a formula to reference, e.g., how many customers Homer had in January. Imagine a VLOOKUP where the column number would be the number when the month and KPI match. The data would be in Worksheet A and the formula would be in Worksheet B where the use can select the Employee and Month in question (there would already be a section to display the KPIs).

Does this make sense and can this be done? My research is leading me towards an INDEX MATCH formula, but I'm not sure if that's the right option for me. I'll post an update if I figure this one out by myself.

Thank you :)
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Some options:

=INDEX(B3:J6,MATCH("Homer",A3:A6,0),MATCH(1,INDEX((B1:J1="Jan")*(B2:J2="Customers"),0),0))
=SUMPRODUCT((B1:J1="Jan")*(B2:J2="Customers")*(A3:A6="Homer")*B3:J6)
=SUMIFS(INDEX(B3:J6,0,MATCH(1,INDEX((B1:J1="Jan")*(B2:J2="Customers"),0),0)),A3:A6,"Homer")
=VLOOKUP("Homer",A3:J6,MATCH(1,INDEX((A1:J1="Jan")*(A2:J2="Customers"),0),0),0)
 
Upvote 0
Hi,

The simplest way is to add a row that concatenate both title on the top (then hide row or write in wite). So Homer ends up in A4. B1 formula to concatenate is

Code:
=B2&B3
that you drag all yhe way to the right

You can then do an index match in worksheet B.

In WorksheetB, if A1 is Jan, B1 is Homer and C1 is Customers (you can have dropdown lists)

Then index match formula is
Code:
=INDEX('Workshet A'!A1:J7,MATCH('Worksheet B'!B1,'Workshet A'!A1:A7,0),MATCH('Worksheet B'!A1&'Worksheet B'!C1,'Workshet A'!A1:J1,))
and returns 7

You can download the file here

https://1drv.ms/x/s!AvmGsNl7aaaAgvQwRLfy9Bztj_lLDA
 
Upvote 0
Basically I would add a row on top of table in Worksheet A to concatenate both titles. I would use white font or hide the row then.

Capture.jpg
[/URL][/IMG]

In Worksheet B, I would use this formula

Capture2.jpg
[/URL][/IMG]

Code:
=INDEX('Workshet A'!A1:J7,MATCH('Worksheet B'!B1,'Workshet A'!A1:A7,0),MATCH('Worksheet B'!A1&'Worksheet B'!C1,'Workshet A'!A1:J1,))

You can downlad my test file here: https://1drv.ms/x/s!AvmGsNl7aaaAgvQwRLfy9Bztj_lLDA
 
Upvote 0
A
B
C
D
E
F
G
H
I
J
K
1
JanJanJanFebFebFebMarMarMarSheet A
2
SubscribersLeadsCustomersSubscribersLeadsCustomersSubscribersLeadsCustomers
3
Homer
5​
6​
7​
6​
7​
8​
7​
8​
9​
4
Lenny
6​
7​
8​
7​
8​
9​
8​
9​
10​
5
Carl
7​
8​
9​
8​
9​
10​
9​
10​
11​
6
Barney
3​
2​
1​
4​
3​
2​
2​
1​
0​

<tbody>
</tbody>



A
B
C
D
1
JanSubscribersSheet B
2
Homer
5​
3
Lenny
6​
4
Carl
7​
5
Barney
3​

<tbody>
</tbody>

Sheet B

B2
=SUMPRODUCT(('Sheet A'!$A$3:$A$6='Sheet B'!$A2)*('Sheet A'!$B$1:$J$1='Sheet B'!$B$1)*('Sheet A'!$B$2:$J$2='Sheet B'!$C$1)*('Sheet A'!$B$3:$J$6)) copy down


for another month change B1 with Feb or Mar

for another role change C1 Subscribers with Leads or Customers
 
Last edited:
Upvote 0
Thank you for these excellent solutions! :) I opted for steve's VLOOKUP solution, but all of these formulas are an excellent reference for the future.
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,022
Members
448,939
Latest member
Leon Leenders

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