Check if a person exists in a distribution list

K

k1sr

I'm trying to create some validation in Excel which will check if the user
exists in a specific PDL...

Is this possible, and how do I do it...?

I'm just after VBA code to check the user against the PDL, then return True
or False
 
J

Jarek Kujawa

why not try this formula:

=COUNTIF(your_PDL_range,user)


in VBA, select your column with data, then run the macro (it will
insert "TRUE" one cell to the right from the cell containing user name
if the user is in the list):

Sub test()
Dim cell as Range
For Each cell in Selection
If Application.Worksheetfunction.Countif(Selection,cell.value)>0 Then
cell.Offset(0,1) = "TRUE"
End if
Next cell
End Sub
 
K

k1sr

Thanks All - I should have logged this question in programming - I'm after
live VBA script
 
Top