Using The Vlookup Function To Design Workers Payroll System In Excel

The VLOOKUP function is similar to the LOOKUP function. The V in VLOOKUP stands for vertical. Like the LOOKUP function, the whole data must be sorted first before Excel can return a result. VLOOKUP function is used to search a specified range of column(s) of a spreadsheet for a value. If the value is found, Excel can now return data from another cell in the same row with the lookup value.
Using The Vlookup Function To Design Workers Payroll System In Excel

The syntax for the VLOOKUP function is:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

You need to first read: LOOKUP FUNCTION AND REFERENCING DATA IN OTHER WORKSHEETS OF AN EXCEL WORKBOOKAlso see the full tutorial course content of this Microsoft Excel Tutorial Series



The function takes four arguments:
1. lookup_value (required): This is the value to search in the first column of the table or range. The lookup_value argument can be a value or a reference. If the value you supply for the lookup_value argument is smaller than the smallest value in the first column of the table_array argument, VLOOKUP returns the #N/A error value. 

2. table_array (required): This is the range of cells that contains the data. You can use a reference to a range (for example, A2:D8), or a range name. The values in the first column of table_array are the values searched by lookup_value. These values can be text, numbers, or logical values. Uppercase and lowercase text are equivalent. 


3. col_index_num (required): This is the column number in the table_array argument from which the matching value must be returned. A col_index_num argument of 1 returns the value in the first column in table_array; a col_index_num of 2 returns the value in the second column in table_array, and so on. 


If the col_index_num argument is:
Less than 1, VLOOKUP returns the #VALUE! error value. 
Greater than the number of columns in table_array, VLOOKUP returns the #REF! error value.

4. range_lookup (optional): This is the fourth argument and it is optional. A logical value that specifies whether you want VLOOKUP to find an exact match or an approximate match:


If range_lookup is either TRUE or is omitted, an exact or approximate match is returned. If an exact match is not found, the next largest value that is less than lookup_value is returned.

If range_lookup is either TRUE or is omitted, the values in the first column of table_array must be placed in ascending sort order; otherwise, VLOOKUP might not return the correct value.

If range_lookup is FALSE, the values in the first column of table_array do not need to be sorted.

If the range_lookup argument is FALSE, VLOOKUP will find only an exact match. If there are two or more values in the first column of table_array that match the lookup_value, the first value found is used. If an exact match is not found, the error value #N/A is returned. 

NOTES:

When searching text values in the first column of table_array, ensure that the data in the first column of table_array does not contain leading spaces, trailing spaces, inconsistent use of straight ( ' or " ) and curly ( ‘ or “) quotation marks, or non printing characters. In these cases, VLOOKUP might return an incorrect or unexpected value. 

When searching number or date values, ensure that the data in the first column of table_array is not stored as text values. In this case, VLOOKUP might return an incorrect or unexpected value. 


If range_lookup is FALSE and lookup_value is text, you can use the wildcard characters — the question mark (?) and asterisk (*) — in lookup_value. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) preceding the character. 



For example, using the same worksheet I used to illustrate the LOOKUP function, to find a worker with ID equal to JS001, enter the following formula in cell B10:
=VLOOKUP(A3, A3:B7, 2, FALSE) and press Enter.

The function should return JOHN, the name that matches the ID, JS001.

ILUSTRATION: PERFORMING CALCULATIONS USING VLOOKUP FUNCTION

DESIGNING A PAYROLL SYSTEM USING VLOOKUP FUNCTION

You can also use the LOOKUP function to perform some calculations. For example:

QUESTION:

Using the information contained in the worksheet shown in the figure below, design a payroll system containing the workers’ details and a pay slip in the same worksheet. Also calculate the New Salary inside the pay slip.
Payroll System Using VLOOKUP function
Payroll System Using VLOOKUP function

SOLUTION TO THE ABOVE PAYROLL SYSTEM EXERCISE

1. Prepare your worksheet as shown in the figure below.
Layout of Payroll system using VLOOKUP function
Layout of Payroll system using VLOOKUP function
2. Type in the following formula in cell A13 (the yellow cell):
=CONCATENATE(VLOOKUP(C9,A3:E7,2,FALSE)," ",VLOOKUP(C9,A3:E7,3,FALSE)) and press Enter.

The CONCATENATE function above has 3 arguments: 
The first argument is generated by the VLOOKUP function nested in the CONCATENATE and it returns the surname of the worker whose ID is equal to the value entered in cell C9.

The second argument returns a space.

The third argument returns the last name of the worker whose ID is equal to the value entered in cell B9.

The Three returned argument combined together gives the full name of the worker whose ID is entered in cell C9.

3. Type in the following formula in cell C13 (under the FULL NAME column):
=VLOOKUP(C9,A3:E7,4,FALSE)+VLOOKUP(C9,A3:E7,5,FALSE) and press Enter.

The first VLOOKUP function in the formula above returns the salary of the worker whose ID is entered in cell C9.

The second VLOOKUP function returns the value of the 10% salary increment of the same worker.

The sum of the value returned by both function gives the new salary of the worker.
Now let me test your knowledge.

EXERCISE UNDER VLOOKUP FUNCTION

Now repeat the last illustration above, but this time use a separate worksheets of a workbook to prepare workers details table and the pay slip table of the payroll system using the same procedure shown above.
Calculate the New Salary inside the pay slip table.

HINTS:

Rename the first worksheet to WORKERS_DETAILS and the second worksheet to PAY_SLIP.
Remember to use absolute cell references as shown previously.

Congrats! You have completed the part 3 of this Excel tutorial. 

You now have to go to Chapter 4 (Store Ledger Accounting in MS Excel).

Don't forget to subscribe for free to get my Tutorial updates delivered to your email. Press a SHARE button to help your friends who may need this tutorial.

Comment your questions in the comment box below.

Recommended Entrepreneurship Books

the passionate entrepreneurs strategies book by buzzer joseph

The Passionate Entrepreneur’s Strategies: Learn how to discover business ideas that will be successful, grow multiple online income streams, make money from home, attract new and retain customers, applications of SWOT analysis in any business, skills that will help you succeed as an entrepreneur, self-discipline, etc. Lucrative Business Ideas Series Book 1. By Buzzer Joseph. Read more about the book.

how to make money from blogging and affiliate marketing book by buzzer joseph

How to Make Money from Blogging and Affiliate Marketing: Learn the Step by Step Guide of Creating, Growing and Optimizing your WordPress Blog from Scratch for Search Engines (SEO) and How to Make Money through Google AdSense, Affiliate Marketing and Other Strategies for Earning Passive Income Online. Lucrative Business Ideas Series Book 2. By Buzzer Joseph. Read more about the book.

how to make money self publishing kindle books by buzzer joseph

How to Make Money Self-Publishing Kindle Books for Beginners: Learn the Step by Step Guide to Self-Publish a Best Selling Book on Amazon KDP, How to Design Book Covers with Adobe Photoshop, Format, Edit and Proofread your Book Manuscript with Microsoft Word, Promote your Book on Various Online Platforms and Earn Monthly Passive Income Online. Lucrative Business Ideas Series Book 3. By Buzzer Joseph. Read more about the book.

diy grid and off-grid solar pv installation guide by buzzer joseph

Complete Solar PV System Installation Guide: DIY guide on how to install grid-connected and off-grid solar PV systems, how to build solar-powered electric cars, convert conventional cars to electric cars, online and offline ways to make money from solar energy sector (including stocks), electrical wiring and protection system installation guides, plus free resources for skill acquisition and personal development. Lucrative Business Ideas Series Book 4. By Buzzer Joseph. Read more about the book.

how to make money from cryptocurrency trading and investments by buzzer joseph

How to Make Money from Crypto Trading and Investing for Beginners: Step by step guide with screenshots on the basics of blockchain technology, bitcoin and altcoins, crypto security tips, cryptocurrency market analysis (FA and TA), long term and short term trading, how to calculate your profits in excel, legit ways to make money with cryptocurrencies, DeFi yield farming and staking, how to use any centralized and decentralized exchange platform and more, plus crypto investment bonus! Lucrative Business Ideas Series Book 5. By Buzzer Joseph. Read more about the book.

blockchain practical guide kindle book by buzzer joseph

Blockchain Practical Guide: Step by step guide with pictures, on how to monetize the latest blockchain technology trends: crypto trading and tools, especially Ethereum, DeFi, Staking, NFTs, Top 100 Play-to-Earn (P2E) and NFT games, Web 3.0, Metaverse, Virtual Reality (VR), Augmented Reality (AR), blockchain job opportunities, with crypto investment bonus! Lucrative Business Ideas Series Book 6. By Buzzer Joseph. Read more about the book.

how to make money with blockchain web3 apps kindle book by buzzer joseph and kelly joseph

How to Make Money with Blockchain Web3 Apps: Step by Step Guide with Screenshots and Videos on How to Make Money from Blockchain and Web3 Projects – NFTs, Play-to-Earn (P2E) Games, Move-to-Earn (M2E) Apps, Watch-to-Earn (W2E) Apps, SocialFi and GameFi Apps, with crypto investment bonus! Lucrative Business Ideas Series Book 7. By Buzzer Joseph and Kelly Joseph. Read more about the book.

No comments:

Post a Comment

WHAT'S ON YOUR MIND?
WE LOVE TO HEAR FROM YOU!