Vlookup and Match formula to look up name and a range of days.

I have a table, with names to the left and days on the top of the table, which are the amount of days a ticket is open in the system. I want a vlookup or any other that would work, to give me the number of tickets for 1 -2 days  3 -5 days 6 to 10 days and 11+ days for each name in the table. I have attached a sample sheet.samplesheet72215.xlsx
LVL 19
Edward PamiasTeam Lead RRS DeskAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rob HensonFinance AnalystCommented:
Formulas against first line C18 to F18:

=SUMIF($B$1:$M$1,"<="&2,$B2:$M2)      
=SUMIF($B$1:$M$1,"<="&5,$B2:$M2)-SUM($C18:C18)      
=SUMIF($B$1:$M$1,"<="&10,$B2:$M2)-SUM($C18:D18)      
=SUM(B2:M2)-SUM(C18:E18)

Copy down
0
Edward PamiasTeam Lead RRS DeskAuthor Commented:
Rob,

The data changes daily, can I use a named range so the totals change everyday?
0
Rob HensonFinance AnalystCommented:
Having another look but off for the night shortly.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Ejgil HedegaardCommented:
Another method is to have the min and max days in each group defined in cells, row 15 and 16 in the sheet.
In general I prefer to have limit values in cells, and not inside formulas.
The text in row 17 reflect the min and max numbers.
Then one formula in C18 can be copied to the entire range.
=SUMIFS(INDEX($B$2:$M$11,MATCH($B18,$A$2:$A$11,0),0),$B$1:$M$1,">="&C$15,$B$1:$M$1,"<="&C$16)

Besides that the name range B18:B27 don't have to be in the same order as the data.

See sheet.
samplesheet72215.xlsx
0
Edward PamiasTeam Lead RRS DeskAuthor Commented:
That worked as well. Now how can I make a named range for this? My columns could be more or less on any given day and the data changes daily.
0
Ejgil HedegaardCommented:
Added a Summary sheet, and made 3 dynamic range names
DaysOpen, from B1 to the number of columns used.
NameList, from A2 to the number of rows used.
DataRange, from B2 to the number of rows in column A, and the number of columns in row 1.

You can add new rows with names and new columns for days open on the Data sheet.
The only requirement is that no empty cells are allowed in column A and row 1 in the lists.
The names on the Summary sheet are the NameList.
The Summary sheet is defined to row 20, copy if you need more.
samplesheet72215-ver-2.xlsx
0
Edward PamiasTeam Lead RRS DeskAuthor Commented:
I tried modifying this for my actual sheet and its not working. My data is actually in a pivot table. Does that change anything?
0
Ejgil HedegaardCommented:
Yes, that means it should probably be something else.

I guess it is possible to make a similar setup with reference to a pivot table, but why do that, when a pivot table is designated to make sums for categories.
I think it is much easier to make the classification in columns next to the pivot data with some simple formulas, and let the pivot table make the sum for each name.

Please upload a workbook with the real data setup.
0
Edward PamiasTeam Lead RRS DeskAuthor Commented:
Here is the same file I had before but I added a pivot the way it looks in my sheet. Row 4 on the sheet is the days open and the names are in column A.
samplesheet72215-ver-3.xlsx
0
Rob HensonFinance AnalystCommented:
on a spare sheet somewhere set up the following lookup table:

0      1-2 Days
3      3-5 Days
6      6-10 Days
11      11 or more days

I have put it in Summary K2:L5

Then in Sheet1, your pivot source data, include the following formula in column M with header "Group":

=VLOOKUP(L2,Summary!$K$2:$L$5,2)

Then in the pivot, expand the source data area to include column M and then drag "Group" as a column label instead of "Days Open".

Thanks
Rob H
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Edward PamiasTeam Lead RRS DeskAuthor Commented:
Rob,

This resolves all my problems. Adding this to the sheet1 data and making the pivot is much easier than creating a table.

Thank you again!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.