Hi Everyone,
Just wondering if anyone might have a solution to the following problem.
I have a set of data that is exported from a system we use at work into an excel file, and the data covers 4 different departments.
The trouble is, the data source doesn't split it out by the department it's assigned to, it splits it out by team leader.
I have the names of the team leaders for each department. The issue I have is that I need to filter the data shown by department when I do my manipulation.
The department is in cell A1 and is a drop down so can be toggled between Recovery and CDR. The value of which is used to determine which team leader data is used in the calculations.
I could just do a COUNTIFS and SUMIFS in each cell for each team leader... based on an IF formula for if A1 is Recovery or A1 is CDR... but that will use a lot of processing power and a lot of my time to create all the formulae in each cell.
I wondered if there was a simpler way to do it.
So for example (here's what it's like with 2 team leaders but in reality there are actually 10 team leaders for each dept so the coding is horrific):
Andrew Saunders - Recovery
Dan Wise - Recovery
Louise Brady - CDR
Heather Prophet - CDR
This code needs to be replicated in 20 lines of data across 30 or 40 columns. So it's going to be quite horrendous.Please Login or Register to view this content.
Can anyone see a better way? If I was using PHP/MySQL i could simply run the query:
So I just wondered if there was a simpler approach in Excel for this that I'm missing?PHP Code:
If($A1 = "Recovery") {
$sql = "SELECT * FROM table WHERE TeamLeader='Andrew Saunders' OR TeamLeader='Dan Wise'";
Else If ($A1 = "CDR") {
$sql = "SELECT * FROM table WHERE TeamLeader='Louise Brady' OR TeamLeader='Heather Prophet'";
}
Thanks
Bookmarks