Page 448 - Computer Software Application TP - Volume 1
P. 448

COMPUTER SOFTWARE APPLICATION - CITS



           EXERCISE 72 : Look up data by using functions



            Objectives

           At the end of this exercise you shall be able to
           •  lookup data by using functions VLOOKUP ,HLOOKUP & INDEX formula.


            Procedure


           Method 1: VLOOKUP
           VLOOKUP is a powerful function in Excel used to search for a value in the first column of a range (table or array)
           and return a value in the same row from a column you specify.
           Syntax:






           •  lookup_value: The value you want to search for.
           •  table_array: The range of cells that contains the data you want to search in. The first column of this range
              should contain the lookup values.

           •  col_index_num: The column number in the table_array from which to return the value.
           •  [range_lookup] (optional): A logical value that specifies whether you want an exact match or an approximate
              match. If TRUE or omitted, it will find an approximate match. If FALSE, it will find an exact match.

           TASK 1: Create a new dataset with columns ID, Product, and Price. Use the VLOOKUP function to find the
                   price of a product with ID 201

           Products Details

                        ID                               Product                         Price


                        101                              Laptop                          80000

                        102                              Smartphone                      50000

                        103                              Camera                          350000


                        104                              Smartwatch                      30000


                        201                              Headphones                      2000


           Now, suppose you want to look up the Price of the Product  with ID 201. You can use the VLOOKUP function.
           In cell D2, you can enter the formula:
           =VLOOKUP(A7,A3:C7,3,FALSE)











                                                           433
   443   444   445   446   447   448   449   450   451   452   453