Using If statement with a unique ID

byorj

New Member
Joined
Feb 28, 2020
Messages
18
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am having trouble setting up a document. I am currently using Concatenate with an agents name and date to form a unique ID for that week. I am then trying to bring that data into a new sheet which marks the percentage 1-5 based on ranges.

I have attached an example sheet but I can quite work out my 1-5 if statement formula with Unique IDs if anyone has any ideas, I would really appreciate the help.

Data sheet:

EXAMPLE SHEET.xlsx
ABCDEFGHIJKLMNOPQRSTU
1Unique IDTicket Assignee# Unsatisfied# Satisfied# Solved TicketsDateWeek NumStaffed TimePick Up %Total CallsDial AttemptsInboundOutboundFollow UpAwayOn CallACWAVG Speed to AnswerAdherenceMonthYear
2Agent 144200Agent 112612304/01/2021238:40:42100.00%343433102:16:3700:49:5904:04:3502:19:3300:00:0682.40%Jan2021
3Agent 244200Agent 242519104/01/2021235:41:09100.00%333532100:29:0402:33:4703:29:1501:01:4800:00:0773.04%Jan2021
4Agent 344200Agent 311210904/01/2021221:43:23100.00%111211000:10:0800:31:5301:00:1800:19:5600:00:0683.33%Jan2021
5Agent 444200Agent 4022504/01/2021200:00:00Jan2021
6Agent 544200Agent 511818204/01/2021231:02:3494.12%181716200:33:1001:16:1201:13:0900:46:1600:00:0659.56%Jan2021
7Agent 644200Agent 6066604/01/2021200:00:00Jan2021
8Agent 744200Agent 703643104/01/2021252:59:33100.00%191919000:26:0000:42:3601:16:0001:01:5900:00:0468.94%Jan2021
9Agent 844200Agent 802617404/01/2021236:00:1397.78%5645441200:30:3003:13:4904:13:2601:48:0200:00:0382.03%Jan2021
10Agent 944200Agent 912614504/01/2021240:22:02100.00%4336331000:37:5701:54:4404:39:0501:55:1200:00:0387.68%Jan2021
11Agent 1044200Agent 1011618004/01/2021238:54:31100.00%343030400:13:0600:51:0002:30:1800:51:3900:00:0394.70%Jan2021
12Agent 1144200Agent 1112818304/01/2021200:00:00Jan2021
13Agent 1244200Agent 120159404/01/2021205:43:02100.00%111111000:00:0000:00:0002:57:0800:16:1000:00:0580.87%Jan2021
14Agent 1344200Agent 1333015404/01/2021238:00:23100.00%373937001:01:5101:22:1303:38:2501:23:3500:00:0885.09%Jan2021
15Agent 1444200Agent 1400404/01/2021200:00:00Jan2021
16Agent 1544200Agent 1503031004/01/2021247:34:59100.00%474745200:00:0000:07:2802:26:1301:24:5900:00:0692.77%Jan2021
17Agent 1644200Agent 161119704/01/2021237:30:53100.00%272726100:00:0002:46:0002:55:2503:28:4100:00:0791.28%Jan2021
18Agent 1744200Agent 17012304/01/2021200:00:00Jan2021
19Agent 1844200Agent 1801412904/01/2021216:03:40100.00%999000:10:2600:05:4101:15:2000:45:1800:00:0693.90%Jan2021
20Agent 1944200Agent 19011204/01/2021200:00:00Jan2021
21Agent 2044200Agent 2022518904/01/2021235:14:23100.00%171212501:01:1100:57:0801:24:4500:36:2900:00:0770.04%Jan2021
22Agent 2144200Agent 21011004/01/2021200:00:00Jan2021
23Agent 2244200Agent 220109504/01/2021200:09:220.00%100100:00:0000:00:0000:09:1700:00:0300:00:00Jan2021
24Agent 2344200Agent 23037704/01/2021214:41:06100.00%201515500:32:3400:04:2301:16:1200:41:1200:00:0681.30%Jan2021
25Agent 2444200Agent 24045304/01/2021210:03:0591.67%121211100:00:0000:12:1101:08:4700:23:3200:00:05Jan2021
26Agent 2544200Agent 2514113904/01/2021240:52:47100.00%252423200:30:5800:20:0902:41:3903:56:1700:00:1092.22%Jan2021
27Agent 2644200Agent 2600804/01/2021200:00:00Jan2021
28Agent 2744200Agent 2700904/01/2021200:00:00Jan2021
29Agent 2844200Agent 2811717404/01/2021233:43:20100.00%232222100:17:3201:04:4402:19:3500:37:4400:00:0675.53%Jan2021
30Agent 2944200Agent 29053804/01/2021214:34:52100.00%141414000:59:4801:24:2501:31:4501:53:0300:00:0562.65%Jan2021
31Agent 3044200Agent 30065404/01/2021219:18:02100.00%151414100:08:4100:34:5102:08:5800:23:1600:00:0686.95%Jan2021
32Agent 3144200Agent 3113619304/01/2021232:16:3692.00%232523002:09:0802:40:0202:27:4801:31:0600:00:0964.15%Jan2021
33Agent 3244200Agent 3202115104/01/2021231:08:0796.43%272827000:39:3300:55:5801:38:2502:03:5700:00:0458.86%Jan2021
34Agent 3344200Agent 3322012904/01/2021238:05:1280.00%273527000:00:0000:05:2504:10:2001:15:3800:00:1287.62%Jan2021
DATA
Cell Formulas
RangeFormula
A2:A34A2=CONCATENATE(B2, F2)


What I am looking for but based on unique IDs:

EXAMPLE SHEET.xlsx
ABCDEF
1UNIQUE IDAGENT NAMEDATEADHERENCEPICK UP %FOLLOW UP
2Agent 144200Agent 104/01/20214
3Agent 244200Agent 204/01/20214
4Agent 344200Agent 304/01/20214
5Agent 444200Agent 404/01/2021 
6Agent 544200Agent 504/01/20212
7Agent 644200Agent 604/01/2021 
8Agent 744200Agent 704/01/20213
9Agent 844200Agent 804/01/20214
10Agent 944200Agent 904/01/20215
11Agent 1044200Agent 1004/01/20215
12Agent 1144200Agent 1104/01/2021 
13Agent 1244200Agent 1204/01/20214
14Agent 1344200Agent 1304/01/20215
15Agent 1444200Agent 1404/01/2021 
16Agent 1544200Agent 1504/01/20215
17Agent 1644200Agent 1604/01/20215
18Agent 1744200Agent 1704/01/2021 
19Agent 1844200Agent 1804/01/20215
20Agent 1944200Agent 1904/01/2021 
21Agent 2044200Agent 2004/01/20214
22Agent 2144200Agent 2104/01/2021 
23Agent 2244200Agent 2204/01/2021 
24Agent 2344200Agent 2304/01/20214
25Agent 2444200Agent 2404/01/2021 
26Agent 2544200Agent 2504/01/20215
27Agent 2644200Agent 2604/01/2021 
28Agent 2744200Agent 2704/01/2021 
29Agent 2844200Agent 2804/01/20214
30Agent 2944200Agent 2904/01/20213
31Agent 3044200Agent 3004/01/20215
32Agent 3144200Agent 3104/01/20213
33Agent 3244200Agent 3204/01/20212
34Agent 3344200Agent 3304/01/20215
Sheet2
Cell Formulas
RangeFormula
A2:A34A2=CONCATENATE(B2, C2)
D2:D34D2=IF(DATA!S2>=85%,5,IF(DATA!S2>=70%,4,IF(DATA!S2>=60%,3,IF(DATA!S2>=50%,2,IF(DATA!S2>=40%,1,"")))))



Thank you!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Do you have the new LET function?
 
Upvote 0
Perhaps this will do what you need?
Excel Formula:
=IFERROR(MATCH(XLOOKUP(A2,Data!$A$2:$A$34,Data!$S$2:$S$34,0),{40,50,60,70,85}%),"")
 
Upvote 0
Perhaps this will do what you need?
Excel Formula:
=IFERROR(MATCH(XLOOKUP(A2,Data!$A$2:$A$34,Data!$S$2:$S$34,0),{40,50,60,70,85}%),"")
That does work, but how do I edit the ranges to what shows 1-5 vs the percentage?

Thanks,
 
Upvote 0
You can edit the percentage ranges with the numbers in this part

{40,50,60,70,85}

Note that the numbers are, and must be in ascending order, the first value on the left will always return 1, the 2nd value will return 2 and so on.
Anything that is not an exact match for one of the numbers will be rounded down. Anything less than the first value will cause an error and return a blank.
 
Upvote 0
That's perfect thank you!

Is there a way to say if lower than 40, show 1? would <40,50,50,70,85 work? also, would this work with times? I have a part of the data that would be in hours and minutes.
 
Upvote 0
No, you can't use the < symbol in this type of formula, it needs to be the lowest permissible number.
This would give you 1 for anything from 0 to 39.99 but it would mean that all of the other numbers increase by 1, e.g. 40-49% changes from 1 to 2, 85%+ changes from 5 to 6.
Excel Formula:
=IFERROR(MATCH(XLOOKUP(A2,Data!$A$2:$A$34,Data!$S$2:$S$34,0),{0,40,50,60,70,85}%),"")

It could work for times as well, but not quite so easily. Depending on the scale to be used it might be easier with a lookup table.
 
Upvote 0
No, you can't use the < symbol in this type of formula, it needs to be the lowest permissible number.
This would give you 1 for anything from 0 to 39.99 but it would mean that all of the other numbers increase by 1, e.g. 40-49% changes from 1 to 2, 85%+ changes from 5 to 6.
Excel Formula:
=IFERROR(MATCH(XLOOKUP(A2,Data!$A$2:$A$34,Data!$S$2:$S$34,0),{0,40,50,60,70,85}%),"")

It could work for times as well, but not quite so easily. Depending on the scale to be used it might be easier with a lookup table.

Thank you that clears it up. With the times it would be for a duration doing a specific task. So 00:30:00 is 5, 01:00:00, 4 and so on.

EXAMPLE SHEET.xlsx
P
1Follow Up
202:16:37
300:29:04
400:10:08
5
600:33:10
7
800:26:00
900:30:30
1000:37:57
1100:13:06
12
1300:00:00
1401:01:51
15
1600:00:00
1700:00:00
18
1900:10:26
20
2101:01:11
22
2300:00:00
2400:32:34
2500:00:00
2600:30:58
27
28
2900:17:32
3000:59:48
3100:08:41
3202:09:08
3300:39:33
3400:00:00
3500:26:41
3601:15:54
3701:33:45
38
3900:30:53
40
4100:20:17
4200:30:40
4300:42:57
4400:03:17
45
4600:41:15
4700:57:12
48
4900:04:16
5000:00:00
51
5200:00:00
53
5401:34:40
55
5600:00:00
5700:41:10
5800:00:00
5903:18:00
60
6100:15:16
6200:35:28
6302:26:41
6400:38:11
6501:17:39
6601:45:41
6700:10:50
DATA
 
Upvote 0
Using a different approach, is this giving the correct results?
I've set it up so that 00:00:00 to 00:30:00 returns 1, 00:30:01 to 01:00:00 returns 2, etc in 30 minute intervals. Anything greater than 02:00:00 will return 1
This might be a bit harder to follow so I'll hold back on the 'how it works' until we know it does :)
Book1 (version 1).xlsb
FG
1FOLLOW UPResult
202:16:371.00
300:29:045.00
400:10:085.00
5 
600:33:104.00
7 
800:26:005.00
900:30:304.00
1000:37:574.00
1100:13:065.00
12 
1300:00:005.00
1401:01:513.00
15 
1600:00:005.00
1700:00:005.00
18 
1900:10:265.00
20 
2101:01:113.00
22 
2300:00:005.00
2400:32:344.00
2500:00:005.00
2600:30:584.00
27 
28 
2900:17:325.00
3000:59:484.00
3100:08:415.00
3202:09:081.00
3300:39:334.00
3400:00:005.00
Sheet4
Cell Formulas
RangeFormula
G2:G34G2=IF(F2="","",MEDIAN(5-INT((F2-"0:00:01")/"00:30"),1,5))
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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