Count columns if they have data, except duplicates

EmmaFos

New Member
Joined
Oct 25, 2020
Messages
25
Office Version
  1. 2016
Platform
  1. Windows
Hello out there!
Hoping someone may help, I am scheduling blocks of work by week and need a formula to divide C5 by count rows in sheet1 & insert into the respective date. The below formula works perfectly when summing all the numbers, the issue I have is when blocks double up in a date column, I need the duplicates to be ignored or counted across the dates.
IE, the sum of G23:G27 in Sheet1 is 36 across a 26 day block - it's the 26 days I need to C5 divided by and I'm not quite sure how to include that in my formula?

I would really appreciate the help!

Excel Formula:
=IF(OR(Sheet1!G$23=1,Sheet1!G$24=1,Sheet1!G$25=1,Sheet1!G$26=1,Sheet1!G$27=1),Sheet2!$C$5/SUM(Sheet1!$G$23:$EB$27),"")

Schedule_Test.xlsx
Y
25
Sheet1


Schedule_Test.xlsx
E
5 
Sheet2
Cell Formulas
RangeFormula
E5E5=IF(OR(Sheet1!G$23=1,Sheet1!G$24=1,Sheet1!G$25=1,Sheet1!G$26=1,Sheet1!G$27=1),Sheet2!$C$5/SUM(Sheet1!$G$23:$EB$27),"")
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hello out there!
Hoping someone may help, I am scheduling blocks of work by week and need a formula to divide C5 by count rows in sheet1 & insert into the respective date. The below formula works perfectly when summing all the numbers, the issue I have is when blocks double up in a date column, I need the duplicates to be ignored or counted across the dates.
IE, the sum of G23:G27 in Sheet1 is 36 across a 26 day block - it's the 26 days I need to C5 divided by and I'm not quite sure how to include that in my formula?

I would really appreciate the help!

Excel Formula:
=IF(OR(Sheet1!G$23=1,Sheet1!G$24=1,Sheet1!G$25=1,Sheet1!G$26=1,Sheet1!G$27=1),Sheet2!$C$5/SUM(Sheet1!$G$23:$EB$27),"")

Schedule_Test.xlsx
Y
25
Sheet1


Schedule_Test.xlsx
E
5 
Sheet2
Cell Formulas
RangeFormula
E5E5=IF(OR(Sheet1!G$23=1,Sheet1!G$24=1,Sheet1!G$25=1,Sheet1!G$26=1,Sheet1!G$27=1),Sheet2!$C$5/SUM(Sheet1!$G$23:$EB$27),"")
Hi,
Thanks for responding!
Sorry, yes - I have edited my original post with the correct range
 
Upvote 0
Hi,
Thanks for responding!
Sorry, yes - I have edited my original post with the correct range
Hi again,
Thanks, it looks like the update of this post didn't go through, this is the correct example workbook - I've shortened the range to formula

Appreciate your help

Excel Formula:
=IF(OR(Sheet1!G$3=1,Sheet1!G$4=1),Sheet2!$C$3/SUM(Sheet1!$G$3:$W$4),"")

Schedule_Test.xlsx
ABCDEFGHIJKLMNOPQRST
2HoursNumbers6-Jun-2213-Jun-2220-Jun-2227-Jun-224-Jul-2211-Jul-2218-Jul-2225-Jul-221-Aug-228-Aug-2215-Aug-2222-Aug-2229-Aug-225-Sep-2212-Sep-2219-Sep-22
3BL013939.35123.10468755555555555555555
4BL0210734.35335.4484375                
5BL037871.65245.9890625                
6BL047022.85219.4640625                
7BL059752304.75                
Sheet2
Cell Formulas
RangeFormula
B3B3=SUM(Sheet1!D3:D11)
C3:C7C3=B3/32
B4B4=SUM(Sheet1!D12:D22)
B5B5=SUM(Sheet1!D23:D29)
B6B6=SUM(Sheet1!D30:D37)
B7B7=SUM(Sheet1!D40:D48)
E3:T3E3=IF(OR(Sheet1!G$3=1,Sheet1!G$4=1),Sheet2!$C$3/SUM(Sheet1!$G$3:$W$4),"")
E4:T4E4=IF(OR(Sheet1!G$12=1,Sheet1!G$13=1,Sheet1!G$14=1,Sheet1!G$1=1,Sheet1!G$16=1),Sheet2!$C$4/SUM(Sheet1!$G$12:$EB$16),"")
E5:T5E5=IF(OR(Sheet1!G$23=1,Sheet1!G$24=1,Sheet1!G$25=1,Sheet1!G$26=1,Sheet1!G$27=1),Sheet2!$C$5/SUM(Sheet1!$G$23:$EB$27),"")
E6:T6E6=IF(OR(Sheet1!G$30=1,Sheet1!G$31=1,Sheet1!G$32=1,Sheet1!G$33=1,Sheet1!G$34=1),Sheet2!$C$6/SUM(Sheet1!$G$30:$EB$34),"")
E7:T7E7=IF(OR(Sheet1!G$40=1,Sheet1!G$41=1,Sheet1!G$42=1,Sheet1!G$43=1,Sheet1!G$44=1),Sheet2!$C$7/SUM(Sheet1!$G$40:$EB$44),"")


Schedule_Test.xlsx
ABCDEFGHIJKLMNOPQRSTUV
2Durations DaysDurations WeeksHoursNumbers6-Jun-2213-Jun-2220-Jun-2227-Jun-224-Jul-2211-Jul-2218-Jul-2225-Jul-221-Aug-228-Aug-2215-Aug-2222-Aug-2229-Aug-225-Sep-2212-Sep-2219-Sep-22
3BL014081016.0511111111
4BL0112024290.31111111111111111
5BL01204145.15
Sheet1
Cell Formulas
RangeFormula
B3:B5B3=C3*5
C3:C5C3=SUM(G3:DS3)
 
Upvote 0
Hi,
Any suggestions from an awesome individual out there?

Thanks
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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