ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Multiple If and Vlookup function (https://www.excelbanter.com/excel-worksheet-functions/104468-multiple-if-vlookup-function.html)

broadspectrum

Multiple If and Vlookup function
 

Hi,

I am trying to organise a formula that will allow me to do a vlookup in
a cell while needing to have multiple selection criteria to start with
(hence the using an IF statement aswell).

For example

In the original spreadsheet (O) I have to following data:

Employee Number, Name, Weekending Date, Worked Hours, Worked $, O/T
Hours, O/T $ etc.

In the data spreadsheet (D) I have for multiple employees and multiple
weeks:

Employee number, Name, Pay Item Description, Pay Qantity, Pay Total
etc.

What I want to be able to do is an IF statement and then a VLOOKUP
statement which will mean that I can have the following:

If Employee number (O) = Employee Number (D), and Weekending Date (O) =
Weekending Date (D), and Pay Item Description (O) = Pay Item Description
(D), then vlookup(Employee Number(C5),"Employee
Details"!C1:K25,8,False)


Cheers,

Matt


--
broadspectrum
------------------------------------------------------------------------
broadspectrum's Profile: http://www.excelforum.com/member.php...o&userid=37378
View this thread: http://www.excelforum.com/showthread...hreadid=570651


Dav

Multiple If and Vlookup function
 

Obviously you will have to put the proper cell references in but

If(and( Employee number (O) = Employee Number (D), Weekending Date (O)
= Weekending Date (D), Pay Item Description (O) = Pay Item Description
(D)), vlookup(Employee Number(C5),"Employee Details"!C1:K25,8,False),"
")

Unless you are performing a match down the whole column, Perhaps you
need to give more details of what you exactly want.

Regards Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=570651


broadspectrum

Multiple If and Vlookup function
 

Thanks Dav,

As you suggested I do actually need to perform the match down the whole
column.

How would I need to change this formula to allow me to match the
information down a whole column.

As when I try to just do this (ie Employee number (O) = Employee Number
(D1:D156)) change I get a nil response.


--
broadspectrum


------------------------------------------------------------------------
broadspectrum's Profile: http://www.excelforum.com/member.php...o&userid=37378
View this thread: http://www.excelforum.com/showthread...hreadid=570651



All times are GMT +1. The time now is 11:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com