ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Converting numbers to text (https://www.excelbanter.com/excel-worksheet-functions/55990-converting-numbers-text.html)

Chrisj20

Converting numbers to text
 
I regularly run reports which produce a column of staff by reference to their
code number which I have to manually change to their initials. Is there a way
of doing this automatically or by running a macro.

Thanks anyone.

Ron Coderre

Converting numbers to text
 
Maybe you could do something like this:

-On a separate sheet, build a 2-column list that contains EmpNum in the
first column and EmpName in the second.

-Select the entire list
-InsertNameDefine
\Names in Workbook: LU_Name
\Refers to: (should already be selected)
\Click [OK]

Next, on your report sheet, if the EmpNum is in Cell A2, build this formula
in a cell to the right:
=VLOOKUP(A2,LU_Name,2,0)
Copy that formula down as far as needed.

It finds the EmpNum from Col_A in the first column of the LU_Name range and
returns the corresponding name from column 2.

Does that help?

€¢€¢€¢€¢€¢€¢€¢€¢€¢€¢
Regards,
Ron


"Chrisj20" wrote:

I regularly run reports which produce a column of staff by reference to their
code number which I have to manually change to their initials. Is there a way
of doing this automatically or by running a macro.

Thanks anyone.


Gord Dibben

Converting numbers to text
 
Chris

This can generally be done by use of a VLOOKUP formula once a table has been
set up.

For more on VLOOKUP see Help or go to Debra Dalgleish's site for a great
tutorial and a downloadable example workbook.

http://www.contextures.on.ca/xlFunctions02.html


Gord Dibben Excel MVP

On Thu, 17 Nov 2005 07:30:10 -0800, "Chrisj20"
wrote:

I regularly run reports which produce a column of staff by reference to their
code number which I have to manually change to their initials. Is there a way
of doing this automatically or by running a macro.

Thanks anyone.




All times are GMT +1. The time now is 08:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com