Unsure what formula to use

Cdsilcox

New Member
Joined
Aug 10, 2016
Messages
3
I track injuries for my company, and I need to track which type of injuries have occurred in the last 90, 30, and 7 days.

for example
Column G: Body part affected by injury
Column B: Date of injury

In Column G I need to know how many times the body part "Arm" occurs within the last 90 days. What formula could I use to correctly count these occurrences?

I have tried several countifs functions to no prevail.
 
Welcome to the Board!

Try something like this (for Arm in the past 90 days):
Code:
=COUNTIFS(G1:G100,"Arm",B1:B100,">=" & (TODAY()-90))
 
Last edited:
Upvote 0
Something like this? Obviously you will have to adjust the ranges to fit your data.

Excel 2010
BCDEF

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]Date of Injury[/TD]
[TD="align: center"]Body Part Affected[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Body Part[/TD]
[TD="align: center"]# times within last 90 days[/TD]

[TD="align: center"]2[/TD]
[TD="align: center"]2/3/2016[/TD]
[TD="align: center"]Arm[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Arm[/TD]
[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]
[TD="align: center"]5/12/2016[/TD]
[TD="align: center"]Leg[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]4[/TD]
[TD="align: center"]5/14/2016[/TD]
[TD="align: center"]Hip[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]5[/TD]
[TD="align: center"]6/11/2016[/TD]
[TD="align: center"]Arm[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]6[/TD]
[TD="align: center"]7/7/2016[/TD]
[TD="align: center"]Arm[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F2[/TH]
[TD="align: left"]=COUNTIFS(B:B,">="&TODAY()-90,C:C,E2)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Awesome this worked! I was using this formula before except I had it reversed in order and it wouldn't work! Thank you so much!

Something like this? Obviously you will have to adjust the ranges to fit your data.

Excel 2010
BCDEF

<tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]Date of Injury[/TD]
[TD="align: center"]Body Part Affected[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Body Part[/TD]
[TD="align: center"]# times within last 90 days[/TD]

[TD="align: center"]2[/TD]
[TD="align: center"]2/3/2016[/TD]
[TD="align: center"]Arm[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Arm[/TD]
[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]
[TD="align: center"]5/12/2016[/TD]
[TD="align: center"]Leg[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]4[/TD]
[TD="align: center"]5/14/2016[/TD]
[TD="align: center"]Hip[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]5[/TD]
[TD="align: center"]6/11/2016[/TD]
[TD="align: center"]Arm[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]6[/TD]
[TD="align: center"]7/7/2016[/TD]
[TD="align: center"]Arm[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: #DAE7F5"]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]F2[/TH]
[TD="align: left"]=COUNTIFS(B:B,">="&TODAY()-90,C:C,E2)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
This is how i was originally trying it but it wouldnt work. However, for some reason by switching the order, it worked! Thank you for your time and response.
 
Upvote 0

Forum statistics

Threads
1,226,909
Messages
6,193,614
Members
453,810
Latest member
Gks77117

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