Link to home
Start Free TrialLog in
Avatar of get-ADuser -F ($_.Name -eq "Todd")
get-ADuser -F ($_.Name -eq "Todd")Flag for United States of America

asked on

I need to trim text from a cell. I am not sure how to create the function in Excel

I have this cell value of:

CN=John Doe,CN=Users,DC=mydomain,DC=int

Every cell is like this as I am getting it from Active Directory.  What I need is a function to give me just the name.  So the next cell's value is John Doe.  I think the function is trim, but not sure how to grab just the users name from this cell value.  Only thing I see common is the name starts after the "=" and there is a comma right after the name.  Your help is greatly appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Glenn Ray
Glenn Ray
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of get-ADuser -F ($_.Name -eq "Todd")

ASKER

That is Brilliant Glenn Ray.  Works great.  I am going to ask another question here shortly.  If you can figure out, I am putting Active Directory info in an access database for some other I.T. people to look at.  If all possible,  I would like to get the first and last name in two separate cells.  I will reference you and your solution in case it helps.  Thank you so much