OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

How to use vlookup function with multiple worksheets

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
sriniwas67
General User
General User


Joined: 05 Mar 2012
Posts: 9

PostPosted: Tue Jun 19, 2012 3:55 am    Post subject: How to use vlookup function with multiple worksheets Reply with quote

Sample work sheets

Sheet 1 Column A
Emp Name
Jhon
Abraham
Jack

Sheet 2.Column A
Emp Name
Abraham
Jack
Jhon
Clarke

Sheet 2.Column B
Emp.No
245
376
465
595

Request Code for the following

To update sheet 1 with emp no & also the name of Clarke and his emp No from sheet 2.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10065
Location: Germany

PostPosted: Tue Jun 19, 2012 7:41 am    Post subject: Reply with quote

X1 =N(MATCH(val; vector1;0))
Y1 =N(MATCH(val; vector2;0))
Z1 =INDEX(colB ; IF(X1;X1;Y1))

of course you should organize your data more efficiently.
_________________
Rest in peace, oooforum.org
Get help on http://forum.openoffice.org
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 8976
Location: Lexinton, Kentucky, USA

PostPosted: Tue Jun 19, 2012 12:33 pm    Post subject: Reply with quote

Sheet1, B2
=VLOOKUP(A2;Sheet2.A$2:B$5;2;0)
and copy down the column.
Back to top
View user's profile Send private message
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 1844
Location: Sydney, Australia

PostPosted: Tue Jun 19, 2012 3:54 pm    Post subject: Re: How to use vlookup function with multiple worksheets Reply with quote

sriniwas67 wrote:
...& also the name of Clarke and his emp No from sheet 2.

http://www.mediafire.com/view/?h713ltjh76e3y3p
has an array formula that adds Sheet2 Emp Names not already on Sheet1, then the VLOOKUP formula adds the appropriate Emp.No.

Ken Johnson
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group