Excel Tutorial - Example of how to use the VLOOKUP function Tutorial di Excel - Esempio di come utilizzare il VLOOKUP funzione

Posted on September 5, 2007 at 1:50 pm Postato il 5 settembre 2007 a 1:50 ore

Here’s a quick tutorial for those who need help using the VLOOKUP function in Excel. Ecco una breve guida per coloro che hanno bisogno di aiuto utilizzando l'VLOOKUP funzione in Excel. VLOOKUP is a very useful function for easily searching through one or more columns in large worksheets to find related data. VLOOKUP è una funzione molto utile per la ricerca facilmente attraverso uno o più colonne in grandi fogli di lavoro, per individuare i dati relativi. You can use HLOOKUP to do the same thing for one or more rows of data. Puoi utilizzare HLOOKUP di fare la stessa cosa per uno o più righe di dati. Basically when using VLOOKUP, you’re asking “Here’s a value, find that value in this other set of data, and then return to me the value of another column in that same set of data.” Fondamentalmente quando si utilizza VLOOKUP, si sta chiedendo "Qui c'è un valore, trovo che questo valore in altri set di dati, e quindi tornare a me il valore di un'altra colonna nella stessa serie di dati."

So you might ask how this can be useful? Quindi, si potrebbe chiedere come questo può essere utile? Well, take for example, the following Bene, prendiamo per esempio, il seguente sample spreadsheet Foglio di calcolo di esempio I have created for this tutorial. Ho creato per questo tutorial. The spreadsheet is very simple: one sheet has information on a couple of car owners such as name, id of the car, color and horsepower. Il foglio di calcolo è molto semplice: è un foglio di informazioni su una coppia di proprietari di auto, come il nome, l'ID di auto, colore e la potenza. The second sheet has the id of the cars and their actual model names. Il secondo foglio è l'ID di auto e la loro attuale modello di nomi. The common data item between the two sheets is the car id. L'elemento comune di dati tra i due fogli è l'auto ID.

Now if I wanted to display the name of the car on sheet 1, I can use VLOOKUP to lookup each value in the car owners sheet, find that value in the second sheet, and then return the second column (the car model) as my desired value. Ora, se ho voluto visualizzare il nome della vettura su foglio 1, posso utilizzare VLOOKUP alla ricerca di ogni valore nel foglio di proprietari di auto, valore che nel secondo foglio, e poi tornare la seconda colonna (il modello di autovettura), come il mio Valore desiderato. So how do you go about this? Così come si va di questo? Well first you’ll need to enter the formula into cell H4 . Ben prima devi inserire la formula nella cella H4. Notice that I have already entered the full formula into cell F4 through F9 . Notare che ho già entrato nel pieno formula nella cella F4 attraverso F9. We’ll walk through what each parameter in that formula actually means. Provvederemo a piedi attraverso ciò che ogni parametro in effetti significa quella formula.

Here’s what the formula looks like complete: Ecco ciò che appare come la formula completa:

=VLOOKUP(B4,Sheet2!$A:$B,2,FALSE) = VLOOKUP (B4, Sheet2! $ A: $ B, 2, FALSE)

There are 5 parts to this function: Ci sono 5 parti di questa funzione:

1. =VLOOKUP - The = denotes that this cell will contain a function and in our case that is the VLOOKUP function to search through one or more columns of data. 1. = VLOOKUP - Il = denota che questa cella conterrà una funzione e che nel nostro caso è il VLOOKUP funzione di ricerca attraverso uno o più colonne di dati.

2. B4 - The first argument for the function. 2. B4 - Il primo argomento per la funzione. This is the actual search term that we want look for. Questo è il vero termine di ricerca che vogliamo cercare. The search word or value is whatever is entered into cell B4. La ricerca di parola o di valore è ciò che è entrato in cella B4.

3. Sheet2!$A:$B - The range of cells on Sheet2 that we want to search through to find our search value in B4. 3. Sheet2! $ A: $ B - La gamma di cellule su Sheet2 che vogliamo cercare di trovare attraverso la nostra ricerca valore in B4. Since the range resides on Sheet2, we need to precede the range with the name of the sheet followed by an !. Dal momento che la gamma risiede sulla Sheet2, abbiamo bisogno di far precedere la gamma con il nome del foglio seguito da un! . If the data is on the same sheet, there is no need for the prefix. Se i dati sono sullo stesso foglio, non vi è alcuna necessità che il prefisso. You can also use named ranges here if you like. Puoi anche utilizzare il nome gamme qui se volete.

4. 2 - This number specifies the column in the defined range that you want to return the value for. 4. 2 - Questo numero indica la colonna della gamma definita che vuoi per il valore di ritorno. So in our example, on Sheet2, we want to return the value of Column B or the car name, once a match is found in Column A. Note, however, that the column’s position in the Excel worksheet does not matter. Quindi, nel nostro esempio, su Sheet2, vogliamo ritornare il valore della colonna B nome o la macchina, una volta che viene trovata una corrispondenza nella colonna A. Si noti, tuttavia, che la posizione della colonna nel foglio di lavoro di Excel non importa. So if you move the data in Columns A and B to D and E, let’s say, as long as you defined your range in argument 3 as $D:$E , the column number to return would still be 2. Quindi, se spostare i dati in colonne AeB della D ed E, diciamo, fintanto che hai definito il tuo gamma di argomenti 3 come $ D: $ indirizzo, il numero di tornare colonna sarebbe ancora 2. It’s the relative position rather than the absolute column number. E 'la posizione relativa piuttosto che il numero assoluto colonna.

5. False - False means that Excel will only return a value for an exact match. 5. Falso - Falso significa che Excel restituisce solo un valore per una corrispondenza esatta. If you set it to True, Excel will look for the closest match. Se impostata a vero, Excel cerca il più vicino corrispondono. If it’s set to False and Excel cannot find an exact match, it will return #N/A . Se impostato a False e Excel non riesce a trovare una corrispondenza esatta, esso ritornerà # N / A.

Hopefully, you can now see how this function can be of use, especially if you have lots of data exported out from a normalized database. Speriamo che, ora puoi vedere come questa funzione possa essere utile, soprattutto se avete una grande mole di dati esportati al di fuori di una base dati normalizzata. There may be a main record that has values stored in lookup or reference sheets. Ci può essere una delle principali verbale che ha valori memorizzati in fogli di ricerca o di riferimento. You can pull in other data by “joining” the data using VLOOKUP. Potete tirare in altri dati di "entrare" i dati utilizzando VLOOKUP.

Another thing you may have noticed is the use of the $ symbol in front of the column letter and row number. Un'altra cosa che avrete notato è l'uso del simbolo $ davanti la lettera della colonna e numero di riga. The $ symbol tells Excel that when the formula is dragged down to other cells, that the reference should remain the same. Il simbolo $ indica a Excel che, quando la formula è trascinato ad altre cellule, che il riferimento dovrebbe rimanere lo stesso. For example, if you were to copy the formula in cell F4 to H4, remove the $ symbols and then drag the formula down to H9, you’ll notice that the last 4 values become #N/A. Ad esempio, se si sceglie di copiare la formula nella cella F4 per H4, rimuovere i simboli $ e quindi trascinare la formula verso H9, si nota che gli ultimi 4 valori diventano # N / A.

The reason for this is because when you drag the formula down, the range changes according to the value for that cell. La ragione di questo è dovuto al fatto che quando si trascina verso il basso la formula, la gamma cambia a seconda che il valore per cella. So as you can see in the picture above, the lookup range for cell H7 is Sheet2!A5:B8 . Quindi, come si vede nella figura sopra, il campo di ricerca per cella H7 è Sheet2! A5: B8. It simply kept adding 1 to the row numbers. È semplicemente mantenuto aggiungendo 1 alla riga numeri. To keep that range fixed, you need to add the $ symbol before the column letter and row number. Per mantenere gamma che fissa, è necessario aggiungere il simbolo $ prima la lettera della colonna e numero di riga.

One note: if you’re going to set the last argument to True, you need to make sure that the data in your lookup range (the second sheet in our example) is sorted in ascending order otherwise it will not work! Una nota: se stai andando a fissare l'ultimo argomento a vero, è necessario assicurarsi che i dati contenuti nel campo di ricerca (il secondo foglio nel nostro esempio), è ordinato, in ordine ascendente, altrimenti non funziona!

Any questions, post a comment! Eventuali domande, postare un commento!

Technorati Tags: Technorati Tags: , , , , ,

If you enjoyed this post, make sure you Se goduto di questo post, assicuratevi di subscribe to my RSS feed Iscriviti al mio feed RSS ! !

» Filed Under Ordinata Pagina » MS Office Tips MS Office Suggerimenti

Related Posts Altre post

Please post your comments/suggestions! Vi preghiamo di inserire i tuoi commenti / suggerimenti!