#1   Report Post  
CCloud
 
Posts: n/a
Default User ID's

I am attempting to make unique user Id's using excel or access.
I want to CONCATENATE a first name and last name into first initial last
name but if there are duplicates I want the second one to be first initial
last name 1.

ie: john doe jdoe
joe doe jdoe1
Help!
Thanks
  #2   Report Post  
Max
 
Posts: n/a
Default

Assume this data is in cols A & B, from row1 down:

john doe
joe doe
mary jane
peter doe
etc

Put in C1:

=IF(OR(A1="",B1=""),"",LEFT(A1,1)&B1&IF(COUNTIF($B $1:B1,B1)-1=0,"",COUNTIF($
B$1:B1,B1)-1))

Copy C1 down

Col C will yield:

jdoe
jdoe1
mjane
pdoe2

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"CCloud" wrote in message
...
I am attempting to make unique user Id's using excel or access.
I want to CONCATENATE a first name and last name into first initial last
name but if there are duplicates I want the second one to be first initial
last name 1.

ie: john doe jdoe
joe doe jdoe1
Help!
Thanks



  #3   Report Post  
CCloud
 
Posts: n/a
Default


Max,
I thought I had it with this... but my data is producing this...
Cherry Cloud CCloud
Christopher Cloud CCloud1
Chad Cloud CCloud2
Mark Smith MSmith
Michael Smith MSmith1
john roberts jroberts
Vila smith Vsmith2

Notice vila smith has a 2 and he is the first vsmith.
Did I do something wrong?
"Max" wrote:

Assume this data is in cols A & B, from row1 down:

john doe
joe doe
mary jane
peter doe
etc

Put in C1:

=IF(OR(A1="",B1=""),"",LEFT(A1,1)&B1&IF(COUNTIF($B $1:B1,B1)-1=0,"",COUNTIF($
B$1:B1,B1)-1))

Copy C1 down

Col C will yield:

jdoe
jdoe1
mjane
pdoe2

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"CCloud" wrote in message
...
I am attempting to make unique user Id's using excel or access.
I want to CONCATENATE a first name and last name into first initial last
name but if there are duplicates I want the second one to be first initial
last name 1.

ie: john doe jdoe
joe doe jdoe1
Help!
Thanks




  #4   Report Post  
Max
 
Posts: n/a
Default

Try this revised set-up ..

Data is in cols A & B, from row1 down:

Put in C1: =LEFT(A1,1)&B1

Put in D1:

=IF(OR(A1="",B1=""),"",TRIM(LEFT(A1,1)&B1&IF(COUNT IF($C$1:C1,C1)-1=0,"",COUN
TIF($C$1:C1,C1)-1)))

Select C1:D1, fill down

Col D should now yield the results you want
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"CCloud" wrote in message
...

Max,
I thought I had it with this... but my data is producing this...
Cherry Cloud CCloud
Christopher Cloud CCloud1
Chad Cloud CCloud2
Mark Smith MSmith
Michael Smith MSmith1
john roberts jroberts
Vila smith Vsmith2

Notice vila smith has a 2 and he is the first vsmith.
Did I do something wrong?



  #5   Report Post  
Jay
 
Posts: n/a
Default

I am attempting to make unique user Id's using excel or access.
I want to CONCATENATE a first name and last name into first initial
last name but if there are duplicates I want the second one to be
first initial last name 1.

ie: john doe jdoe
joe doe jdoe1


Off-topic a bit, but hopefully you've thought ahead about what will happen
in the future when new people arrive or current people depart. If the first
"john doe" departs, for example. Most likely, you'll want still-in-use
id's to stay the same.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cells User Select Locked after upgrade to Excel 2002 TWilson Excel Discussion (Misc queries) 1 August 5th 05 12:22 PM
Print scrollable user form. cparsons Excel Discussion (Misc queries) 2 August 4th 05 04:45 PM
User forms "back" buttons DavidObeid Excel Discussion (Misc queries) 1 June 22nd 05 09:07 AM
Finding a record based on user input Soundman Excel Discussion (Misc queries) 5 June 21st 05 03:06 AM
Positioning 2 User Forms mully New Users to Excel 3 June 11th 05 08:15 PM


All times are GMT +1. The time now is 05:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"