Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find criteria and return name with VB
Good day all, i got some code from this site to get the users name. It
works great, however we log in using a number e.g. QT00572, which it returns. What i now need to do is get the users name, i have a sheet called "names" in the file Recon_Master.xls file. When i open this file i want the code to greet the person by name, so i must look up his name by using his number to find the name.The visable sheet is not "Names" sheet and i do not want to display it either. Could somebody please give some help with this. Thanks in advance, Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find criteria and return name with VB
Dim sLogin As String Dim sname sLogin = Environ("UserName") sname = Application.Index(Worksheets("Names").Range("B:B") , _ Application.Match(sLogin, Worksheets("Names").Range("A:A"), 0)) If Not IsError(sname) Then MsgBox sname End If -- HTH RP (remove nothere from the email address if mailing direct) "Tempy" wrote in message ... Good day all, i got some code from this site to get the users name. It works great, however we log in using a number e.g. QT00572, which it returns. What i now need to do is get the users name, i have a sheet called "names" in the file Recon_Master.xls file. When i open this file i want the code to greet the person by name, so i must look up his name by using his number to find the name.The visable sheet is not "Names" sheet and i do not want to display it either. Could somebody please give some help with this. Thanks in advance, Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find criteria and return name with VB
Thanks Bob,
Bob are you in the UK ? Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find criteria and return name with VB
Yes I am, on the South Coast.
-- HTH RP (remove nothere from the email address if mailing direct) "Tempy" wrote in message ... Thanks Bob, Bob are you in the UK ? Tempy *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return nothing if criteria is not met | Excel Worksheet Functions | |||
EXCEL - Meet 2 criteria, then find next case of third criteria | Excel Worksheet Functions | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
How to return min, mean, max using criteria? | Excel Worksheet Functions | |||
How to return min, mean, max using criteria? | Excel Worksheet Functions |