Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default help with functions

what Excel function should i use that will output an employee code based on
the hired date?

example:
empcode name date hired
A050401 John Evans - 04/01/05

syntax of empcode is (companycode-yr hired-month hired-number sequence)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default help with functions

If you have the company code in A1 (your example A) and the hire date in B1

=A1&TEXT(B1,"yymmdd")


--


Regards,


Peo Sjoblom

"angel" wrote in message
...
what Excel function should i use that will output an employee code based
on
the hired date?

example:
empcode name date hired
A050401 John Evans - 04/01/05

syntax of empcode is (companycode-yr hired-month hired-number sequence)



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default help with functions

Date of hire in C2

Enter this formula in A2:

="A"&TEXT(C2,"yymm")&TEXT(ROWS(A$2:A2),"00")

Copy down as needed.

--
Biff
Microsoft Excel MVP


"angel" wrote in message
...
what Excel function should i use that will output an employee code based
on
the hired date?

example:
empcode name date hired
A050401 John Evans - 04/01/05

syntax of empcode is (companycode-yr hired-month hired-number sequence)



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default help with functions

But what will be the codes, when several employees are hired at once?

It is possible to construct a function which ads an order number for every
employee hired on same day (A050401001, A050401002, etc.), but whenever you
sort your table, those codes are recalculated and the order number part
probably changes. So better use a procedure to calculate a new code and to
write it into table.

I myself use similar codes as key fields for asset databases (written in
Access). The code structure is CCyyyymmddNNN, where CC determines asset
group, yyyymmdd is the registering date for asset, and NNN is registering
order number for this asset in this group and on this day. Whenever a new
row is added, available for user are only a date field with today's date as
default, and an Asset Registering button (userform show only assets from one
selectable group, and any newly registered asset belongs to this group
automatically). Whe the asset is registered, the code will be locked,
registering date control and registering button are hidden, and other fields
are made available.


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"angel" wrote in message
...
what Excel function should i use that will output an employee code based
on
the hired date?

example:
empcode name date hired
A050401 John Evans - 04/01/05

syntax of empcode is (companycode-yr hired-month hired-number sequence)



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
formula/functions for average and if functions Petu71 Excel Worksheet Functions 2 August 5th 07 08:25 PM
XL2003 FILTER FUNCTIONS VS. XL2007 FILTER FUNCTIONS RET70168 Excel Worksheet Functions 0 June 15th 07 01:00 AM
efficiency: database functions vs. math functions vs. array formula nickname Excel Discussion (Misc queries) 2 July 14th 06 04:26 AM
Looking for a site with functions that substitute the ATP functions Franz Verga Excel Worksheet Functions 3 June 24th 06 04:30 AM
Nesting functions in the functions dialog box cs170a Excel Worksheet Functions 0 June 10th 05 10:36 PM


All times are GMT +1. The time now is 02:42 AM.

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"