Solved whn i typ employ NO in col A,i should get the emp name,how?

Microsoft Office excel 2007
August 14, 2012 at 21:02:31
Specs: Windows 7, Pentium 4 2GHz / 4 gigs.
Entering a number in col A will result a name in col B?for eg COL A = 1148 I should get respective name which belong to that number such as PETER in col B?

See More: whn i typ employ NO in col A,i should get the emp name,how?

Report •


✔ Best Answer
August 17, 2012 at 15:27:04
First, I asked you to read the instructions on how to post data in this forum by clicking on the blue line at the end of my posts. It does not appear that you have followed those instructions. If you had, your data would have looked like this:

      B      C        D     E
1   1148   PETER    3210   MARK
2   1234   ALEX     1148   PETER
3   3210   MARK     1234   ALEX

Please try to follow those posting instructions in the future.

Second, unless I don't understand what you are trying to do, VLOOKUP should work fine.

If you start with this...

     B               C                  D      E  
1  1148	 =VLOOKUP(B1,$D$1:$E$3,2,0)  3210    MARK
2		                     1148    PETER
3		                     1234    ALEX

...you will get Peter in C1.

Using 0 (or FALSE) as the range_lookup argument means that the table_array does not have to be sorted in any order.

The Help files on VLOOKUP explain the use of the range_lookup argument.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.



#1
August 15, 2012 at 00:31:56
If you have a table like this:

 
     D       E
1  1148    Peter
2  2235    Mary
3  4321    Tom

Then you could use VLOOKUP

 
       A                B
1    1148     =VLOOKUP(A1,$D$1:$E$3,2,0)

You can read up on the VLOOKUP function in the Excel help files or via Google.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
August 15, 2012 at 05:20:53
This is great,but this is not the right method,bcoz id and name will not be in order,i cannot expect the name in col b if the respective name is stored in col f in the table.or every time i should look out after the col for the name and need to change the formula..Kindly give me another way Thank you

Report •

#3
August 15, 2012 at 05:47:47
A B
EMP ID OPERATOR
1148 PETER
2258 JOHN
3000 ALEX
if i type the ID no,automatically the respective name of the ID should appear in col B.the stored name and id may be in any column,but it should search and give me the respective name without changing the formula.Is there any way?

Report •

Related Solutions

#4
August 15, 2012 at 09:07:44
Please post an example of your table so that we can see where the data is being pulled from.

Before posting example data in this forum, please click on the blue line at the bottom of this post and read the instructions found via that link. Thanks!

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#5
August 17, 2012 at 07:32:17
B C D E
1148 PETER 3210 MARK
1234 ALEX 1148 PETER
3210 MARK 1234 ALEX
D and E are stored data which is in random.1148 and peter in col D&E 2nd row.If i type 1148 in col B 1st row i should get the name though the name is stored in any row and col.It should search the entire stored data and give me the name where ever i type the number.your is usefull when the data is stored in order wise.any other method?

Report •

#6
August 17, 2012 at 15:27:04
✔ Best Answer
First, I asked you to read the instructions on how to post data in this forum by clicking on the blue line at the end of my posts. It does not appear that you have followed those instructions. If you had, your data would have looked like this:

      B      C        D     E
1   1148   PETER    3210   MARK
2   1234   ALEX     1148   PETER
3   3210   MARK     1234   ALEX

Please try to follow those posting instructions in the future.

Second, unless I don't understand what you are trying to do, VLOOKUP should work fine.

If you start with this...

     B               C                  D      E  
1  1148	 =VLOOKUP(B1,$D$1:$E$3,2,0)  3210    MARK
2		                     1148    PETER
3		                     1234    ALEX

...you will get Peter in C1.

Using 0 (or FALSE) as the range_lookup argument means that the table_array does not have to be sorted in any order.

The Help files on VLOOKUP explain the use of the range_lookup argument.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#7
August 18, 2012 at 23:08:20
I have read the instruction and tried many times to get a correct way.unfortunately i clicked the post button.ill try this

Report •

#8
August 18, 2012 at 23:16:19
I got what i want to get,,thank you Mr derby,,

Report •

Ask Question