Hi everybody
I,m new here
my problem is as follows:
I have Two excel sheets
first sheet :has employees data with (id,name,job,department)
second sheet :is a form which has
1- three textboxes (name ,job,department)
2-a label filled with the id of an employee
what I want is to write if function to compare the id from the two sheets and when it is the same id ...I want the name ,job,department to be filled from the first sheet to the text boxes in the second sheet.
more explanation:I want the if function to do multiple missions (to fill many cells with their values at once )
so can I do this with if function and how ??
I really appreciate any help cause I really need this in my new work
thaxx in advance![]()
Last edited by Dalal; 08-29-2011 at 04:43 AM.
I think you really need VLOOKUP, see the example here
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Hi RoyUK
thaxx ...I think Vlookup is wat I need
But I want Vlookup to bring data from multiple columns to multiple form boxes in the same time (by writing one function ) , maybe using a combination from ' if ' function and vlookup
or a nested vlookup if this is possible ...
I'm not sure about how this could be done .
if a combination could be written, please write me a short example code for that
Thank U again for helping .
VLOOKUP() will provide all 3 pieces of information. You just need to edit the 3rd parameter to indicate which column in the vlookup range to return a value from.
=VLOOKUP(A2, Sheet2!$A:$D, 2, 0)
=VLOOKUP(A2, Sheet2!$A:$D, 3, 0)
=VLOOKUP(A2, Sheet2!$A:$D, 4, 0)
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
thaxx Jerry for help
but wat u said is a three steps if i have a three columns
wat i am asking is :
can i merge those three steps in one
i want my data to come from multiple columns into multiple form boxes in one shot
wat may help is a macro which has all the vlookup together ...so can i do this ??
I want the more professional solution if there is one .
thaxx
You said:
if a combination could be written, please write me a short example code for that.
However you asked a very general question and got a very general answer. No one can write a macro with vapor data.
You should have at least provided a sample workbook with some data that actually reflects your real workbook.
You should also have tried to write your own macro by starting the macro recorder and recording all the steps you want.
Then we can help you to generalize the macro to work at the click of a button.
---
Ben Van Johnson
Hi
I guess U r right i must give an example to wat i need ....sorry
anyway I'm new in using functions in excel so I donno wat considered genral question and wat not .
by the way when I said i want a professional solution i meant that I need your patience with me if I discussed more and more .
But It seem U will kill me protonleah![]()
thxxxxxxxxx
I liked this forum and I will stay here
No onw is going to kill you and ProtonLeah isn't even being harsh with you. He's indicated useful things you can do to help us help you.
So, are you going to provide more or are we done for now?
Last edited by JBeaucaire; 08-21-2011 at 05:05 AM.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
Have you looked at my example workbook?
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
![]()
Thaxx all for helping >>>Yes... every thing is good and vlookup is working
RoyUK ...yes I try your example and understand it ...I appreciate this
But I have new questions about : isna and macros
1- what is the work of (isna) and how to use it .
2- how can i assign a value of a2 -as example - to b4 -as example -
generally I want to put a [copy baste] operation in a larger macro
--the value is diffrent in each sheet i want to apply the macro on -
so i want the macro to take it as variable or cell value not as a static number
I donno how to say more than thaxx .... how to say this ??![]()
Why are you first asking for function help then move to macros?
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
when I registered here I wanted functions
But during my work I needed macros to complete the work quickly .
so I thought I can ask u here in same forum .
But if this is against forum rules , I will ask in the macros forum
obviously ... I got a job recently
and my knowledge in excel is very simple ...
I donno about vba coding or excel complex functions
so with time I will need help in many random subjects .
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks