ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Combining If, Vlookup in formula (https://www.excelbanter.com/excel-worksheet-functions/241745-combining-if-vlookup-formula.html)

HR_Payroll

Combining If, Vlookup in formula
 
I need a formula to do the following.

If A3 (hours worked) is greater than 40 then look for employee name (on
separate tab in workbook) and take the overtie pay rate and multipy the rate
x A3, if greater than 40, take the regular rate and multiply the rate x A3.

The formula I created will figure choose the right rate but will not lookup
the person out of the list but this department has 20 people so I need the
formula to look for the person's name and then multiply the rate of pay (reg
rate if under 40 and OT rate if overt 40) x the number of hours. I can't
remember how to name a range in a formula so the vlookup will work right.

Thank you.

Sean Timmons

Combining If, Vlookup in formula
 
=IF(A340,VLOOKUP(A2,Sheet2!A:C,2,0)*A3,VLOOKUP(A2 ,Sheet2!A:C,3,0)*A3)

This assumes your employee name is on A2 of the current worksheet, and in
column a of your search sheet. This also assumes Overtime rate is in column
B and regular rate is in column C of your search worksheet.

To create names, highlight your esired set of data and type in a name on the
top left (left of the formula bar)

"HR_Payroll" wrote:

I need a formula to do the following.

If A3 (hours worked) is greater than 40 then look for employee name (on
separate tab in workbook) and take the overtie pay rate and multipy the rate
x A3, if greater than 40, take the regular rate and multiply the rate x A3.

The formula I created will figure choose the right rate but will not lookup
the person out of the list but this department has 20 people so I need the
formula to look for the person's name and then multiply the rate of pay (reg
rate if under 40 and OT rate if overt 40) x the number of hours. I can't
remember how to name a range in a formula so the vlookup will work right.

Thank you.


Shane Devenshire[_2_]

Combining If, Vlookup in formula
 
Your question isn't clear - you say if A3 is greater than 40 then and a
little further down you say if A3 is greate than then...? Both your
conditions are the same!

If you mean <=40 for the second condition then

=A3*VLOOKUP(A2,Sheet3!A1:C30,2+(A340),)


Where the name is in A2 and
--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"HR_Payroll" wrote:

I need a formula to do the following.

If A3 (hours worked) is greater than 40 then look for employee name (on
separate tab in workbook) and take the overtie pay rate and multipy the rate
x A3, if greater than 40, take the regular rate and multiply the rate x A3.

The formula I created will figure choose the right rate but will not lookup
the person out of the list but this department has 20 people so I need the
formula to look for the person's name and then multiply the rate of pay (reg
rate if under 40 and OT rate if overt 40) x the number of hours. I can't
remember how to name a range in a formula so the vlookup will work right.

Thank you.



All times are GMT +1. The time now is 06:05 AM.

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