nehabansal
New Member
- Joined
- Jun 27, 2018
- Messages
- 1
Hi,
I am using SUMPRODUCT to summarize the vacation days for all employees for each month. My formula looks like this:
=SUMPRODUCT(
('Cal'!$A$1:$A$200=Summary!$A1)*
(('Cal'!$D$4:$ND$160="VC")+
('Cal'!$D$4:$ND$160="SK")+
('Cal'!$D$4:$ND$160="TR")+
('Cal'!$D$4:$ND$160="JD")+
('Cal'!$D$4:$ND$160="BR")+
('Cal'!$D$4:$ND$160="LOA")+
(('Cal'!$D$4:$ND$160="HVC")/2)+
(('Cal'!$D$4:$ND$160="HSK")/2)+
(('Cal'!$D$4:$ND$160="HTR")/2))*
('Cal'!$D$3:$ND$3>=$E$4)*
('Cal'!$D$3:$ND$3<=$F$4))
The vacation days are entered by the employees in sheet Cal and the formula is in sheet Summary. Both sheets are part of the same workbook.
This formula runs for number of employees * months in the year and has slowed down my excel sheet considerably.
Can you please suggest how can I optimize it?
P.S. I cannot use SUMIFS as the values I am counting - VC, SK, etc. are non-numeric
I am using SUMPRODUCT to summarize the vacation days for all employees for each month. My formula looks like this:
=SUMPRODUCT(
('Cal'!$A$1:$A$200=Summary!$A1)*
(('Cal'!$D$4:$ND$160="VC")+
('Cal'!$D$4:$ND$160="SK")+
('Cal'!$D$4:$ND$160="TR")+
('Cal'!$D$4:$ND$160="JD")+
('Cal'!$D$4:$ND$160="BR")+
('Cal'!$D$4:$ND$160="LOA")+
(('Cal'!$D$4:$ND$160="HVC")/2)+
(('Cal'!$D$4:$ND$160="HSK")/2)+
(('Cal'!$D$4:$ND$160="HTR")/2))*
('Cal'!$D$3:$ND$3>=$E$4)*
('Cal'!$D$3:$ND$3<=$F$4))
The vacation days are entered by the employees in sheet Cal and the formula is in sheet Summary. Both sheets are part of the same workbook.
This formula runs for number of employees * months in the year and has slowed down my excel sheet considerably.
Can you please suggest how can I optimize it?
P.S. I cannot use SUMIFS as the values I am counting - VC, SK, etc. are non-numeric