#1   Report Post  
vishu
 
Posts: n/a
Default Urgent please

Hi,

I have Employee name and employee number in one sheet.
In another sheet or another file if i type any employee name it shoud give
me employee number. I dont want to use Vlookup formula.
Is there any other way like validation or something else.
please help me...
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Validation won't do a lookup.

It's hard to know what to suggest, since a VLOOKUP() or something
equivalent [like an INDEX(MATCH()) combination] is nearly always the
appropriate technique to do what you're asking.

Why don't you want to use VLOOKUP()?



In article ,
"vishu" wrote:

I have Employee name and employee number in one sheet.
In another sheet or another file if i type any employee name it shoud give
me employee number. I dont want to use Vlookup formula.
Is there any other way like validation or something else.
please help me...

  #3   Report Post  
dlw
 
Posts: n/a
Default

Some people are hesitant to use vlookup because they think its too
complicated. But its not that hard to figure out, and its a powerful tool,
and in the end youll be glad you took the time to learn it.
  #4   Report Post  
bj
 
Posts: n/a
Default

If it for security or something else you dont want to use Vlookup()?
If it is for Security, You could potencially use a macro on your system
which would allow you to extract the Employee number and paste it into the
cell. If only you had access to the macro and database, then others would
not have to deny external file data updates to the data base when they open
the workbook.

"vishu" wrote:

Hi,

I have Employee name and employee number in one sheet.
In another sheet or another file if i type any employee name it shoud give
me employee number. I dont want to use Vlookup formula.
Is there any other way like validation or something else.
please help me...

  #5   Report Post  
vishu
 
Posts: n/a
Default

I am very much perfect in VLOOKUP().
But I dont want to show formulas in my excel sheet form. The form which I
am creating is multi user form.
The person using this form not aware of employee number. If he enter name,
he should get corresponding employee number.
This form keep on passing to different person.
Please help me if any body has solutions or macros


"bj" wrote:

If it for security or something else you dont want to use Vlookup()?
If it is for Security, You could potencially use a macro on your system
which would allow you to extract the Employee number and paste it into the
cell. If only you had access to the macro and database, then others would
not have to deny external file data updates to the data base when they open
the workbook.

"vishu" wrote:

Hi,

I have Employee name and employee number in one sheet.
In another sheet or another file if i type any employee name it shoud give
me employee number. I dont want to use Vlookup formula.
Is there any other way like validation or something else.
please help me...



  #6   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

Put this in your worksheet code module (right-click on the worksheet tab
and choose "View Code":

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Const sPATH = "<your path here"
Const sFILENAME = "SourceBook.xls"
Dim wbTarget As Workbook
Dim rTarget As Range
Dim bClosed As Boolean
With Target(1)
If Not Intersect(.Cells, Range("EmployeeName")) Is Nothing Then
Application.ScreenUpdating = False
On Error Resume Next
Set wbTarget = Workbooks(sFILENAME)
On Error GoTo 0
If wbTarget Is Nothing Then
Set wbTarget = Workbooks.Open(sPATH & sFILENAME)
bClosed = True
End If
Set rTarget = wbTarget.Sheets(1).Range("A:B")
Application.EnableEvents = False
Range("EmployeeNumber").Value = Application.VLookup( _
.Value, rTarget, 2, False)
Application.EnableEvents = True
If bClosed Then wbTarget.Close SaveChanges:=False
End If
Application.ScreenUpdating = True
End With
End Sub

this assumes that the lookup table is in another workbook/file, and that
your input cell is named "EmployeeName" and you output cell is named
"EmployeeNumber".


In article ,
"vishu" wrote:

I am very much perfect in VLOOKUP().
But I dont want to show formulas in my excel sheet form. The form which I
am creating is multi user form.
The person using this form not aware of employee number. If he enter name,
he should get corresponding employee number.
This form keep on passing to different person.
Please help me if any body has solutions or macros

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
URGENT: Excel files renamed to HEX RJ Excel Discussion (Misc queries) 5 April 8th 05 06:03 AM
Urgent Urgent Urgent!!! Ruslan Excel Discussion (Misc queries) 6 March 30th 05 02:59 PM
URGENT Please... new worksheet with copied formats but no data. DarrellK Excel Worksheet Functions 2 December 1st 04 07:11 PM
Linked sheets - URGENT! Muppet Excel Worksheet Functions 3 November 16th 04 02:24 PM
Urgent help needed: IF function Terence Excel Worksheet Functions 3 November 16th 04 02:29 AM


All times are GMT +1. The time now is 11: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"