Copy value to another sheet based on criteria

Otk168 Posted messages 3 Status Membre -  
via55 Posted messages 14730 Registration date   Status Membre Last intervention   -
Hello everyone,

I am a beginner in Excel, trying to learn gradually both simple and complex formulas.
My problem is as follows:
My workbook consists of 2 sheets, the first contains a "database" with 2 columns (the first gives a reference and the second an associated code for that reference)
In the second sheet, there is a set of rows with a column containing the reference (from the first sheet).
I would like a formula that can fetch the associated code for each reference from page 1 and report it on page 2.
I hope I have been clear and explicit about this problem.

Thank you in advance for your help.

1 réponse

via55 Posted messages 14730 Registration date   Status Membre Last intervention   2 755
 
Hello

You must use VLOOKUP

=VLOOKUP(A1,Sheet1!A:B,2,0)

A1 being the value to look for
Sheet1!A:B the table where to search
2 the column of the information to return
0 requires an exact match

Best regards
Via

--
"Imagination is more important than knowledge." A. Einstein
0
Otk168 Posted messages 3 Status Membre
 
Thank you very much, I tried it and it works wonderfully.
0
Otk168 Posted messages 3 Status Membre
 
Sorry, I'm going to be a bit annoying, but does this formula work to return entire rows?
0
via55 Posted messages 14730 Registration date   Status Membre Last intervention   2 755 > Otk168 Posted messages 3 Status Membre
 
Re,

To return multiple columns, you enlarge the original table
Sheet1!A:D to return the values from columns B to D, for example
Then you change the column number to return in the formula in the destination columns, 2 to return the value from column B, 3 for column C, etc.
0