Return column heading if a cell meets certain criteria in a row

Usernew

New Member
Joined
Nov 20, 2012
Messages
17
I have a table of over 2000 rows of ClientID's and the number of times they have used a particular service in each of 12 columns. I need to be able to see the column heading of the service that each Client has used most frequently over a certain period.

I have been able to obtain the MAX at the end of each row, but I need to be able to establish the percentage of Clients who use particular services most frequently.

E.g.

Client Svc1 Svc2 Svc3 Svc4 Svc5 Svc6 Svc7 Max SvcName
10000 12 23 4 7 0 5 13 23 ????????
10510 0 45 0 0 6 0 1 45 ????????

I have considered VLOOKUP but that doesn't work. Any suggestions would be appreciated.
 

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.
I have a table of over 2000 rows of ClientID's and the number of times they have used a particular service in each of 12 columns. I need to be able to see the column heading of the service that each Client has used most frequently over a certain period.

I have been able to obtain the MAX at the end of each row, but I need to be able to establish the percentage of Clients who use particular services most frequently.

E.g.

Client Svc1 Svc2 Svc3 Svc4 Svc5 Svc6 Svc7 Max SvcName
10000 12 23 4 7 0 5 13 23 ????????
10510 0 45 0 0 6 0 1 45 ????????

I have considered VLOOKUP but that doesn't work. Any suggestions would be appreciated.

Try INDEX(MATCH Function...

=INDEX(B$1:H$1,MATCH(MAX(B$2:H$2),B$2:H$2,0))

p/s: assuming your data start at row-2 from column B to H
 
Upvote 0
Thanks, cml19722000!

I forgot to say that I was using Excel 2003 and I discovered that the INDEX function doesn't work in that version.

However, I tried it in Excel 2007 and it works perfectly. Deeply appreciated.
I wonder if there is any way to get the same result in Excel 2003?
 
Last edited:
Upvote 0
Thanks, cml19722000!

I forgot to say that I was using Excel 2003 and I discovered that the INDEX function doesn't work in that version.

However, I tried it in Excel 2007 and it works perfectly. Deeply appreciated.
I wonder if there is any way to get the same result in Excel 2003?

Should work on all versions...

I2, just enter:

=MAX(B2:H2)

J2, just enter:

=INDEX($B$1:$H$1,MATCH(I2,B2:H2,0))

Note that this will pick out the service that corresponds to the first occurrence of the max value.
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,542
Members
449,316
Latest member
sravya

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