Average individual cell values between two columns and count the number over X

WaqasTariq

Board Regular
Joined
Jun 26, 2012
Messages
58
Office Version
  1. 365
I have two columns in Excel:

[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Column A [/TD]
[TD="align: center"]Column B[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]Res Qty[/TD]
[TD="align: center"]Total Hrs[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]66[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]30[/TD]
[TD="align: right"]Res over 32:[/TD]
[TD="align: center"]10[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]93[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]102[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]180[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]155[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]... row #57[/TD]
[TD="align: center"]... row #57[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

(66/2 = 33, 30/1 = 30, 93/3 = 31, 102/3 = 34, 180/5 = 36, 155/5 = 31) > 32 count = 10

Question: I want to count how many resources work over 32 hours in cell C3. Is there a formula in Excel that will help me do that?
 
Last edited:

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
How about


Book1
ABCDE
2266333
313030
439331
5310234
6518036
7515531
Log
Cell Formulas
RangeFormula
E2{=SUM(IF((B2:B7/A2:A7)>32,1,0))}
Press CTRL+SHIFT+ENTER to enter array formulas.

But all cells need to have values
 
Upvote 0
I think I've got it, try
=SUM(IF((B2:B7/A2:A7)>32,A2:A7,0))
Also array entered.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
@Fluff Thank you for all your help yesterday. If you have time, could you please let me know how I would add the following to the above?


Count resources over 32 but less than 36?

edit: Nevermind, figured it out.

Answer: =(SUM(IF((B2:B7/A2:A7)>32,A2:A7,0)))-(SUM(IF((B2:B7/A2:A7)<36,A2:A7,0)))
 
Last edited:
Upvote 0
Your formula gives me -4 rather than 5
try
=SUM(IF(((B2:B7/A2:A7)>32)*((B2:B7/A2:A7)<36),A2:A7,0))
or
=SUMPRODUCT(((B2:B7/A2:A7)>32)*((B2:B7/A2:A7)<36),A2:A7)
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top