Tags: MAX

Derive end date and time from start date and time, office working hours and lunch breaks

{ 25 Comments }

Given the following inputs/restrictions, one may want to compute the end date and time of a project: 1. Start date and time of the project; and 2. Official working hours; and 3. Lunch breaks hours Furthermore, to add to the complication, one may have different National holidays and weekend days i.e. while for some, the weekend […]

Read More →

Determine the maximum number of consecutive 1’s appearing in a range

{ 26 Comments }

Assume a database where customers are listed from cell A6 down.  From cell B5 to the right months are entered from April to March (B5:M5).  In B6:M6 (Customer 1), a user enters 1’s and 0’s.  A value of 1 respresents “Cheque bounced” and 0 represents “Cheque honoured”.  Similar data is entered for other customers in B7:M500. […]

Read More →

Calculate turn around time excluding Sundays and public holidays

{ 206 Comments }

Assume a two column database showing starting date/time and ending data/time (Data/time stamp appear in a single cell).  Given a list of public holidays in a year and starting and ending work times, one may want to know the turn around time excluding Sundays and public holidays. You may refer to my solution in this […]

Read More →

Extract farthest/latest date based on multiple conditions

{ 0 Comments }

Assume a three column database showing Site ID, Customer, Status and Requested Date.  On the same site ID, the same customer may have different status on different dates.   In such a scenario, one may want to know the farthest/latest requested date and its corresponding status for all unique combinations of Site ID and Customer. I initially attempted to […]

Read More →

Extract number from an alphanumeric string

{ 72 Comments }

Given an alphanumeric string, one may want to perform the following Extract phone number from the string Assume a list of customer addresses with multiple phones numbers mentioned in the address field itself.  These numbers may be mobile numbers and/or mobile numbers.  Furthermore, PIN codes may also be mentioned in the address string. One may want […]

Read More →