Average hours per week

rgillson3

Board Regular
Joined
Oct 3, 2013
Messages
111
Office Version
  1. 365
Platform
  1. Windows
I'm trying to find a simpler/quicker way to obtain the average number of hours per week for employees.

My spreadsheet contains columns for Date, Employee Name, Employee Number and Hours.
 

rgillson3

Board Regular
Joined
Oct 3, 2013
Messages
111
Office Version
  1. 365
Platform
  1. Windows
The last date in Jane Smith's range is 12/31/2021.

When I add that formula in G5, all rows read True. But, it doesn't seem to affect the sumifs formulas. What does the # sign in the formula do?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
67,824
Office Version
  1. 365
Platform
  1. Windows
When I add that formula in G5, all rows read True.
Ok, that means they are all numbers.

The # sign represents the start of a spill range, so the formula takes all values into account.
I found that if I select the range of dates and use Text to Columns, it will quickly convert them all.
Did you do this for the entire column?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
67,824
Office Version
  1. 365
Platform
  1. Windows
Ok, as all the numbers are proper numbers the only thing I can think of is that some of the dates did not convert properly.
If you format the entire col B as General do you just see 5 figure numbers?
 

rgillson3

Board Regular
Joined
Oct 3, 2013
Messages
111
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Yes, all are 5 figure numbers.

If I try "anchor" the cell references to always be on column H, I get a #SPILL! err.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
67,824
Office Version
  1. 365
Platform
  1. Windows
You do not need to anchor the cell ranges. As you can see in post#4 the formula works exactly as is.
I can only think it's something to do with your data. Do you get any errors returned, or do you just get blank cells?
 

rgillson3

Board Regular
Joined
Oct 3, 2013
Messages
111
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

If I do not anchor the column ranges, they change to the next columns over when I attempt to copy the formulas over from I5.

I don't get errors, just zeros.

Even if I use F2 to copy the formula, paste it into J5 and change the cell reference of I4 to J4, I still get zeroes.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
67,824
Office Version
  1. 365
Platform
  1. Windows
Do not copy the formula over, there are just three formulae, one in H5, one in I4 & one in I5.
 

rgillson3

Board Regular
Joined
Oct 3, 2013
Messages
111
Office Version
  1. 365
Platform
  1. Windows
Ok. I got it to work. It looks like it I was entering the sumifs as an array. When I got rid of the columns and started from scratch, it worked.

Is there any way to make the dates always end on a Sunday?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
67,824
Office Version
  1. 365
Platform
  1. Windows
So with that date you would want row 4 to be 3rd, 10th, 17th etc?
 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,573
Messages
5,765,181
Members
425,266
Latest member
CPAgirl

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
Top