Lookup a person to see if they have had a ticket raised in last 12 months

BatemanLDN

New Member
Joined
Nov 17, 2023
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
Hi have a list of users and a list of tickets that have been raised in the last 12 months.
I am trying to put together a formula that looks up the user in the list of tickets to check if they have had a ticket raised for them.
The last 12 months doesnt need to be in the formula as my list of tickets is only the last 12 months worth so it will be assumed that if there is no match then they have had no tickets raised for them in the last 12 months. Thinking ahead, it would be an added bonus if there was something that could be put into the formula to control how many months back it looks, i.e. last 6 months (instead of having to remove the data).
The name list of users is in alphabetical order and the list of tickets is in chrnological order.
The data is on 2 different sheets in 1 workbook, hopefully that doesnt cause issues.
If any more information is needed please let me know.
Thank you in advance
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
not sure how you data is laid out
but a lookup
index/match should work - looking up the user name - but will return only 1 entry

index(cell range with ticket numbers , match ( cell with user name , range of users ,0 ))

also can add a lookup for date

are you still usng 2016 version ?

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
Thanks for the quick reply.
Yes im on 2016 on work laptop which has quite a lot of restrictions but 2019 on personal laptop.

Hopefully these min-sheets work!

Person lookup if ticket logged.xlsx
C
20
All Users


Person lookup if ticket logged.xlsx
D
12
Requests Nov 2022 Oct 2023
 
Upvote 0
Person lookup if ticket logged.xlsx
ABCDE
1NAMEEMAILUPNTicket logged for User in Last 12 months?Answer should be:
2name1email1username1?Yes
3name2email2username2?Yes
4name3email3username3?Yes
5name4email4username4?Yes
6name5email5username5?No
7name6email6username6?No
8name7email7username7?No
9name8email8username8?No
10name9email9username9?No
11name10email10username10?No
All Users
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B1Cell ValueduplicatestextNO


Person lookup if ticket logged.xlsx
ABCD
1Requested for NameUPNRequest IdCreated time
2Name1Username1001December 14, 2022 03:23:41 PM
3Name2Username2002April 19, 2023 11:39:54 AM
4Name3Username3003April 19, 2023 11:40:47 AM
5Name4Username4004July 27, 2023 12:32:42 PM
6Name11Username11005July 27, 2023 11:52:31 AM
7Name12Username12006December 13, 2022 01:13:12 PM
8Name13Username13007January 11, 2023 09:45:39 AM
9Name14Username14008January 11, 2023 09:46:45 AM
10Name15Username15009April 12, 2023 08:19:02 AM
11Name16Username16010July 11, 2023 12:52:36 PM
Requests Nov 2022 Oct 2023
 
Upvote 0
=IF(COUNTIF(Sheet2!$A$2:$A$11,Sheet1!A2),"Yes","No")

using the NAME column, - however could use USERNAME if unique

countifs() to include a date

are the dates in your file real dates or text
click on a date - right click , format > general - should return a number

Book4
ABCDEF
1NAMEEMAILUPNTicket logged for User in Last 12 months?Answer should be:
2name1email1username1?YesYes
3name2email2username2?YesYes
4name3email3username3?YesYes
5name4email4username4?YesYes
6name5email5username5?NoNo
7name6email6username6?NoNo
8name7email7username7?NoNo
9name8email8username8?NoNo
10name9email9username9?NoNo
11name10email10username10?NoNo
Sheet1
Cell Formulas
RangeFormula
F2:F11F2=IF(COUNTIF(Sheet2!$A$2:$A$11,Sheet1!A2),"Yes","No")



Book4
ABCD
1Requested for NameUPNRequest IdCreated time
2Name1Username1144909.6414
3Name2Username2245035.486
4Name3Username3345035.4867
5Name4Username4445134.5227
6Name11Username11545134.4948
7Name12Username12644908.5508
8Name13Username13744937.4067
9Name14Username14844937.4075
10Name15Username15945028.3465
11Name16Username161045118.5365
Sheet2
 
Upvote 0
Solution
Thanks! THat formula worked great.
Yep, the dates are actual dates.

If i was to introduce another IF statement to this formula would you recommend it or do you think it should be separate?
In addition to the formula already done i also need to know if the user has logged on in the last 12 months. The field for this information is Sheet1E:E. This field/column is also an actual date field.
 
Upvote 0
Thanks! THat formula worked great.
Yep, the dates are actual dates.

If i was to introduce another IF statement to this formula would you recommend it or do you think it should be separate?
In addition to the formula already done i also need to know if the user has logged on in the last 12 months. The field for this information is Sheet1E:E. This field/column is also an actual date field.
It would be an OR too if this makes any difference?

Question the folmula is answering - Has the user had a ticket logged for them in the last 12 months OR have they logged on in the last 12 months.

Scenarios:
1. A user could have logged-in but not have a ticket logged for them
2. A user could have not logged-in but had a ticket logged for them
3. Both logged-in and ticket logged for them
4. Both not logged-in and no ticket logged for them.

Thanks again
 
Upvote 0
you could add an OR to the existing IF
at the moment you can use
COUNTIF(Sheet2!$A$2:$A$11,Sheet1!A2)>0
for 12mths
then use
COUNTIF(Sheet1!$E$2:$E$11,Sheet1!A2)>0
if its on a different sheet and range

you can also extend the range to more rows

OR( COUNTIF(Sheet2!$A$2:$A$100,Sheet1!A2)>0 , COUNTIF(Sheet1!$E$2:$E$100,Sheet1!A2)>0 )

IF ( OR( COUNTIF(Sheet2!$A$2:$A$100,Sheet1!A2)>0 , COUNTIF(Sheet1!$E$2:$E$100,Sheet1!A2)>0 ) , "Yes", "No")
 
Upvote 0

Forum statistics

Threads
1,215,086
Messages
6,123,031
Members
449,092
Latest member
ikke

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