Forum Discussion
Using averageif to find average number of days employed in 2020 and 2021
- 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)
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)