DJ Winzlow
New Member
- Joined
- Jun 8, 2018
- Messages
- 3
Hi everyone.
This is my first time posting. I am trying to write a formula to only count if 2 conditions are met.
In Sheet1 I have a table which has 'task names' in column A and in column B 'elapsed time' (how long the task has been opened for in hours).
In Sheet2 I have a table which I am trying to write the formulas to which has 'Task name' in column A and then columns with number of days outstanding (column B '0 days', column C '1 Day' etc..- basically an aging profile of the tasks in days (not hours). I have also added a reference table in sheet2 to as the rule to convert hours to days i.e. 0 - <=8 equals 1 day, >8.01 - <=16 equals 2 days.
Here is what I am trying to achieve.
Condition 1 - The task name in Sheet2 cell A2 must match the task name in Sheet1 column A (only count if the task name matches) THEN
Condition 2 - Now in Sheet1 column B (Elapsed time) I need it to count only the times within the criteria so for day 1 I need it to only return a count of how many are within the required range.
I can write the formulas for each individually but cannot combine the two to achieve the final outcome.
Name Match: =COUNTIFS('Aging Profile Data'!A4:A1661,'Aging Profile Dashboard'!A2)
Count how may in range - =COUNTIF('Aging Profile Data'!A2:A91,'Aging Profile Dashboard'!Q13(Reference Table)-COUNTIF('Aging Profile Data'!A4:A91,'Aging Profile Dashboard'!P13(Reference Table))
Any help would be much appreciated!!???
Sheet1:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD]Task[/TD]
[TD]Elapsed Time[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]383.12[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]187.00[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]58.00[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]51.00[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]45.02[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]41.27[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]34.00[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]16.93[/TD]
[/TR]
[TR]
[TD]Corporate[/TD]
[TD]697.00[/TD]
[/TR]
[TR]
[TD]Corporate[/TD]
[TD]588.17[/TD]
[/TR]
</tbody>[/TABLE]
Sheet2:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD]Service[/TD]
[TD]Day 0[/TD]
[TD]Day 1[/TD]
[TD]Day 2[/TD]
[TD]Day 3[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Corporate[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Simple[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Balance[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Reference table (to convert to days)
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD]Day[/TD]
[TD]>[/TD]
[TD]<=[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]0[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]8.01[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]16.01[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]24.01[/TD]
[TD]32[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]32.01[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]40.01[/TD]
[TD]48[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]48.01[/TD]
[TD]56[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]56.01[/TD]
[TD]64[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]64.01[/TD]
[TD]72[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]72.01[/TD]
[TD]80[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]80.01[/TD]
[TD]88[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]88.01[/TD]
[TD]96[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]96.01[/TD]
[TD]104[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]104.001[/TD]
[TD]112[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]112.01[/TD]
[TD]120[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]120.1[/TD]
[TD]128[/TD]
[/TR]
[TR]
[TD]16+[/TD]
[TD]>128.01[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
This is my first time posting. I am trying to write a formula to only count if 2 conditions are met.
In Sheet1 I have a table which has 'task names' in column A and in column B 'elapsed time' (how long the task has been opened for in hours).
In Sheet2 I have a table which I am trying to write the formulas to which has 'Task name' in column A and then columns with number of days outstanding (column B '0 days', column C '1 Day' etc..- basically an aging profile of the tasks in days (not hours). I have also added a reference table in sheet2 to as the rule to convert hours to days i.e. 0 - <=8 equals 1 day, >8.01 - <=16 equals 2 days.
Here is what I am trying to achieve.
Condition 1 - The task name in Sheet2 cell A2 must match the task name in Sheet1 column A (only count if the task name matches) THEN
Condition 2 - Now in Sheet1 column B (Elapsed time) I need it to count only the times within the criteria so for day 1 I need it to only return a count of how many are within the required range.
I can write the formulas for each individually but cannot combine the two to achieve the final outcome.
Name Match: =COUNTIFS('Aging Profile Data'!A4:A1661,'Aging Profile Dashboard'!A2)
Count how may in range - =COUNTIF('Aging Profile Data'!A2:A91,'Aging Profile Dashboard'!Q13(Reference Table)-COUNTIF('Aging Profile Data'!A4:A91,'Aging Profile Dashboard'!P13(Reference Table))
Any help would be much appreciated!!???
Sheet1:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD]Task[/TD]
[TD]Elapsed Time[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]383.12[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]187.00[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]58.00[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]51.00[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]45.02[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]41.27[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]34.00[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD]16.93[/TD]
[/TR]
[TR]
[TD]Corporate[/TD]
[TD]697.00[/TD]
[/TR]
[TR]
[TD]Corporate[/TD]
[TD]588.17[/TD]
[/TR]
</tbody>[/TABLE]
Sheet2:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD]Service[/TD]
[TD]Day 0[/TD]
[TD]Day 1[/TD]
[TD]Day 2[/TD]
[TD]Day 3[/TD]
[/TR]
[TR]
[TD]Complex[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Corporate[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Simple[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Balance[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Reference table (to convert to days)
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD]Day[/TD]
[TD]>[/TD]
[TD]<=[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]0[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]8.01[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]16.01[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]24.01[/TD]
[TD]32[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]32.01[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]40.01[/TD]
[TD]48[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]48.01[/TD]
[TD]56[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]56.01[/TD]
[TD]64[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]64.01[/TD]
[TD]72[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]72.01[/TD]
[TD]80[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]80.01[/TD]
[TD]88[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]88.01[/TD]
[TD]96[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]96.01[/TD]
[TD]104[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]104.001[/TD]
[TD]112[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]112.01[/TD]
[TD]120[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]120.1[/TD]
[TD]128[/TD]
[/TR]
[TR]
[TD]16+[/TD]
[TD]>128.01[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]