Need Formula

PK1988

New Member
Joined
Jul 29, 2023
Messages
5
Office Version
  1. 2010
Platform
  1. Windows
Hi, I have a data downloaded from the erp, need to calculate the Average working hrs, no of days (excluding weekends) and no.of hrs and no.of days in weekend.
Need formula to get the above information. result table will look like below
Also we should not consider less than 3 hrs data.
1693958559995.png


erp data

1693958473129.png
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Youd probably get a response of you used the XL2BB addin to post data that could be worked with.
See the download in my sig
 
Upvote 0
Maybe something like
Excel Formula:
=Averageif(Name,"apple",date)
 
Upvote 0
Assuming your downloaded data are on the 'ERP' worksheet, see if the following formulas work for you:
No of Hrs (Working Days)
Excel Formula:
=SUMPRODUCT(--(ERP!$A$2:$A$999=C2),--(TEXT(ERP!$C$2:$C$999,"mmm'yy")=TEXT(B2,"mmm'yy")),NETWORKDAYS(+ERP!$C$2:$C$999,+ERP!$C$2:$C$999),--(ERP!$D$2:$D$999>=3),ERP!$D$2:$D$999)
No of days (Working Days)
Excel Formula:
=SUMPRODUCT(--(ERP!$A$2:$A$999=C2),--(TEXT(ERP!$C$2:$C$999,"mmm'yy")=TEXT(B2,"mmm'yy")),NETWORKDAYS(+ERP!$C$2:$C$999,+ERP!$C$2:$C$999),--(ERP!$D$2:$D$999>=3))
No of Hrs (Weekend)
Excel Formula:
=SUMPRODUCT(--(ERP!$A$2:$A$999=C2),--(TEXT(ERP!$C$2:$C$999,"mmm'yy")=TEXT(B2,"mmm'yy")),NETWORKDAYS.INTL(+ERP!$C$2:$C$999,+ERP!$C$2:$C$999,"1111100"),--(ERP!$D$2:$D$999>=3),ERP!$D$2:$D$999)
No of Days (Weekend)
Excel Formula:
=SUMPRODUCT(--(ERP!$A$2:$A$999=C2),--(TEXT(ERP!$C$2:$C$999,"mmm'yy")=TEXT(B2,"mmm'yy")),NETWORKDAYS.INTL(+ERP!$C$2:$C$999,+ERP!$C$2:$C$999,"1111100"),--(ERP!$D$2:$D$999>=3))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,516
Messages
6,125,280
Members
449,220
Latest member
Excel Master

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