# would an If-Then statement/formula solve this

Occasional Visitor

# would an If-Then statement/formula solve this

We have employee dept, rank and hours worked data on a spreadsheet similar to below:

 Department rank hours Construction Manager 3 Design Manager 7 Construction Intern 15 Design intern 16

what's not included in the spreadsheet is rate per hour. What I want to do is create a new column that calculates the total \$ for the work.

example:

• construction manager earns 50\$/hour
• design manager earns 40\$/hour
• construction intern earns 15\$/hour
• design intern earns 10\$/hour

my thinking (pls correct me if im wrong) is that an if then might work here? i dont know if its possible to have multiple if-then statements in a cell.

so:

if department = construction and rank = manager, then hours worked * 50

else if department = design and rank = manager then hours worked *40

and so on

does this make sense? i am open to any other options for solution!

1 Reply

# Re: would an If-Then statement/formula solve this

It's better to add range with rates at any place of your workbook as

and use formula

``=IFNA(\$D4*INDEX(\$H\$4:\$I\$5,MATCH(\$B4,\$G\$4:\$G\$5,0),MATCH(\$C4,\$H\$3:\$I\$3,0)),"wrong data")``