Please help. poss VBA

C

Clash

Hi all,

I have been trying to get a unique ID for a number of entries on m
spreadsheet, the way I have came up with this is Initial first name
Initial second name, date of birth & initial of gender.

It looks like this L-F-12/10/1966-M, but now the number of entries o
the spreadsheet is getting greater and greater daily and it would b
nice to automate this feature to save a bit of time.

Is there a way that this can be done, your help is greatl
appreciated.

Cheer
 
P

paul.robinson

Assuming first name is in column A, second name is in column B, date of
birth is in column C and Gender is in column D (as M or F) then in
column E put the formula
=Left(A1,1)&"-"&Left(B1,1)&"-"&C1&"-"&D1

regards
Paul
 
B

bgeier

how is your data laid out?
where should it be going

first name is in cell A1 (First)
Second name is in cell A2 (Second)
Birthdate is in cell A3 99/99/9999
Gender is in cell A4 Gender

a formula such as

= LEFT(N26,1) & LEFT(N27,1) & N28 & LEFT(N29,1)

would give you FS99/99/99G

or if you want the "-"

=LEFT(N26,1) & "-" & LEFT(N27,1) & "-" & N28 & "-" & LEFT(N29,1)

would give you F-S-99/99/9999-
 
C

Clash

Thanks both,

but there seems to be another problem.

The date is being shown as five numbers, as if the cell hasn't been
formated.

i.e. J-L-29288-M

I have tried to format the cell which the formula is in, but nothing.
 
P

paul.robinson

Hi
Try
=Left(A1,1)&"-"&Left(B1,1)&"-"&text(C1,"dd/mm/yy")&"-"&D1

regards
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top