Ignore blanks in cells using =AVERAGE(IF(MONTH...&YEAR...

gigaenvy

New Member
Joined
Sep 18, 2011
Messages
7
Hi everyone,

Would anyone be kind and help me figure out how to ignore blanks in this array?

=AVERAGE(IF(MONTH('Employee Data'!$D$3:$D$1935)&YEAR('Employee Data'!$D$3:$D$1935)=MONTH(S15)&YEAR(S15),'Employee Data'!$Z$3:$Z$1935,FALSE))

This works great if every cell in column D has a date, but when I leave something blank it fubars my calc to #Value error.

Any help would be appreciated.

Thanks in advance,

Tom
 

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
Maybe...

=AVERAGE(IF(ISNUMBER('Employee Data'!$D$3:$D$1935),IF(MONTH('Employee Data'!$D$3:$D$1935)&YEAR('Employee Data'!$D$3:$D$1935)=MONTH(S15)&YEAR(S15),'Employee Data'!$Z$3:$Z$1935,FALSE)))

Ctrl+Shift+Enter

M.
 
Upvote 0
Control+shift+enter, not just enter:
Rich (BB code):
=AVERAGE(IF(ISNUMBER('Employee Data'!$D$3:$D$1935),
  IF('Employee Data'!$D$3:$D$1935-DAY('Employee Data'!$D$3:$D$1935)+1=
    S15-DAY(S15)+1,
     'Employee Data'!$Z$3:$Z$1935)))
 
Upvote 0
Control+shift+enter, not just enter:
Rich (BB code):
=AVERAGE(IF(ISNUMBER('Employee Data'!$D$3:$D$1935),
  IF('Employee Data'!$D$3:$D$1935-DAY('Employee Data'!$D$3:$D$1935)+1=
    S15-DAY(S15)+1,
     'Employee Data'!$Z$3:$Z$1935)))

Thanks Aladin - I will test and advise and mark solved at next opportunity.

It seems this was not a challenge for you :)

Best,

Tom
 
Upvote 0

Forum statistics

Threads
1,202,922
Messages
6,052,575
Members
444,593
Latest member
Smaxls

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