Forum Discussion
kenmustafa9
Sep 16, 2021Copper Contributor
Using averageif to find average number of days employed in 2020 and 2021
Hi, everyone, on the far right of the excel worksheet i attached below, I'm trying to find the average number of days for nurses who's term date was in 2020, and also trying to find the average for n...
- Sep 16, 2021
The values in columns F and G are not real dates, but text values. To correct this:
Select column F.
On the Data tab of the ribbon, click Text to Columns.
In Step 1 of the Convert Text to Columns Wizard, click Next >.
In Step 2, do the same.
In Step 3, select MDY from the drop-down next to Date.
Click Finish.
Do the same for column G.
Change the formula in N2 to
=AVERAGEIF(G2:G247,"<"&N4,H2:H247)
and that in O2 to
=AVERAGEIF(G2:G247,">"&N5,H2:H247)
HansVogelaar
Sep 16, 2021MVP
The values in columns F and G are not real dates, but text values. To correct this:
Select column F.
On the Data tab of the ribbon, click Text to Columns.
In Step 1 of the Convert Text to Columns Wizard, click Next >.
In Step 2, do the same.
In Step 3, select MDY from the drop-down next to Date.
Click Finish.
Do the same for column G.
Change the formula in N2 to
=AVERAGEIF(G2:G247,"<"&N4,H2:H247)
and that in O2 to
=AVERAGEIF(G2:G247,">"&N5,H2:H247)
No_number_12
Apr 23, 2024Copper Contributor
Hey sup