I have two tables of data, the first is EmployeeSalaryTbl which holds the salaries for employees over time:

and the second StaffDetailsTbl which has details on the employee discipline etc.

I'd like to repurpose a function I use to calculate total employee wages each month so that it only calculates salaries that are reliant on a specific discipline in a given cell, like programming.

To do this, I wondered if it was possible to filter the EmployeeSalaryTbl[Employee], EmployeeSalaryTbl[Salary Start Date], EmployeeSalaryTbl[Salary End Date], etc. results to only contain the rows where the employee has the Programming discipline through a lookup in the StaffDetailsTbl.

Feb 16, 2023 in Others 561 views

## 1 answer to this question.

If you just want to add up the totals and it doesn't have to look attractive, This might be placed in the adjacent column to your table, beginning with the first row you want to examine. then add the values together at the bottom. If you wish to check for different disciplines, you can edit the place where it says programming to make it a cell reference.

`=IF(INDEX(StaffDetailsTbl[Discipline],MATCH(EmployeeSalaryTbl[[#This Row],[Employee]],StaffDetailsTbl[Employee],0))="programming",EmployeeSalaryTbl[[#This Row],[Salary]],"")`
• 38,010 points

## In a excel formula I need to create a list of names on one sheet based upon criteria/data of another sheet

The final formula is: =IF(ROWS(\$H\$3:H3)<=\$I\$1,INDEX(Personnel! ...READ MORE

## How to import data from a HTML table on a website to excel?

Hello  To import any HTML file in excel there ...READ MORE

## Formula for inserting a thumbnail picture into excel cell, based on another cell's value

Here is a really excellent tutorial on ...READ MORE

## Calculate Birthdate from an age using y,m,d in Excel

Hi To Calculate the date, we can ...READ MORE

## Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

## IF - ELSE IF - ELSE Structure in Excel

In this case, you can use nested ...READ MORE