Forum Discussion
farhansaleem
May 28, 2019Copper Contributor
Data Extraction
Hi, I have some data arranged in Year, Month, Day format. I want to extract the common numbers of days (respective to month and year) from the 4 data sets. I have also attached the excel fil...
- May 28, 2019
Hi, i hope that I have understood the task. You want to check if a date is on monday to friday?
I write an userdefined function, see attached file, too.
Function commonDays(strYear As String, strMonth As String, strDay) As Boolean
Dim dteDate As Date
dteDate = DateSerial(strYear, strMonth, strDay)
If Application.WorksheetFunction.Weekday(dteDate, vbMonday) < 6 Then
commonDays = True
Else
commonDays = False
End If
End FunctionRegards from germany
Bernd
http://www.vba-Tanker.com
PeterBartholomew1
May 29, 2019Silver Contributor
Firstly, is this the calculation you have in mind?
I have taken the first table as the master and identified the records that appear in all three secondary tables. A further helper field is used to identify the dates but the orange cell gives the count without using this field.
farhansaleem
May 29, 2019Copper Contributor
Hi Peter,
Actually, i have to apply composite analysis on these extracted number of common days. Thank you for the help.
Farhan