LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
millzenator
 
Posts: n/a
Default Multiplication problem- Please Help!


Thanks for the help so far guys... I am by no means an expert at Excel,
and am only trying to help a friend who owns a body shop. Believe me,
he is not guru at computers, but can bring a car back to life Chris
Foose.

Basically, Progressive Insurance requires that their jobs be completed
within a certain "cycle time", based on when the car arrives at the
shop and when the repairs are completed. A cycle time of 4.0 or 4.5 is
acceptable, but anything below that, and Progressive starts to limit the
number of vehicles that are brought to my friends shop for repairs. His
business is new, and I am doing all that I can to help him get started.

I created one sheet where you input a start date and time and an end
date and time. This sheet calculates the cycle time based on "flag
hours (the number of hours Progressive estimates that the repairs will
take)".

I created another sheet where you input a start date and time, desired
cycle time, and it will tell you when the vehicle is due to maintain
the cycle time that you input in the cell.

What I need is to exclude weekend days, and the work hours for the week
can include all 24 hours of each day. I only need to exclude weekend
days if they fall into the date ranges that are manually added.

I did find this VB code on the net, but I have no idea how to use it:

'**************************************
'Windows API/Global Declarations for :Ne
' tWorkDays
'**************************************
-
'**************************************
' Name: NetWorkDays
' Description:The code is capable of cal
' culating the NETWORK DAYS LIKE it does i
' n excel.
The Weekends gets removed and the days betwwen the 2 dates is the
output in days
' By: Brijesh
'
'
' Inputs:this is the function call
checkAvailableDays = dayscalculation(CalculationStartDate,
WPAEmpEndDate)
'
' Returns:Returns days excluding weekday
' s.
Holidays are included....working on a code to remove that
'
'Assumes:-
'
'Side Effects:I dont see any except for
' the error handling which can be customis
' ed
'This code is copyrighted and has limite
' d warranties.
'Please see http://www.Planet-Source-Cod
' e.com/xq/ASP/txtCodeId.64390/lngWId.1/qx
' /vb/scripts/ShowCode.htm
'for details.
'**************************************

'call to the function
dim checkAvailableDays as integer
checkAvailableDays = dayscalculation(CalculationStartDate,
WPAEmpEndDate)
'---Amazing this code actially works


Private Function dayscalculation(CalculationStartDate As Date,
WPAEmpEndDate As Date)
Dim workingdays As Integer
StDateValue = CDate(CalculationStartDate)
EndDateValue = CDate(WPAEmpEndDate)
If (StDateValue EndDateValue) Then
MsgBox "Sorry Invalid Date Value", vbCritical, "VOID"
workingdays = 0
Else
If (StDateValue = EndDateValue) Then
MsgBox "Sorry Dates are Same", vbCritical, "VOID"
workingdays = 0
Else
workingdays = DateDiffW(StDateValue, EndDateValue)
End If
End If
dayscalculation = workingdays
End Function


Private Function DateDiffW(StDateValue, EndDateValue)
For i = StDateValue To EndDateValue
If (Weekday(i) < 1) And (Weekday(i) < 7) Then
WorkingDaysValue = WorkingDaysValue + 1
End If
Next
DateDiffW = WorkingDaysValue
End Function

If you guys are will to help, I can email my small Excel files to you
for your expert diagnosis :)


--
millzenator
------------------------------------------------------------------------
millzenator's Profile: http://www.excelforum.com/member.php...o&userid=28042
View this thread: http://www.excelforum.com/showthread...hreadid=475490

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Display Problem Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 0 April 19th 05 05:25 PM
EXCEL 2003 PROBLEM Amandle Excel Worksheet Functions 4 April 1st 05 02:25 PM
Freeze Pane problem in shared workbooks JM Excel Discussion (Misc queries) 1 February 1st 05 12:04 AM
Row Autofit problem Excel 2003 Matthias Klaey Excel Discussion (Misc queries) 0 January 19th 05 05:33 PM
Paper Tray selection Problem, Michael Hoffmann Excel Discussion (Misc queries) 4 December 3rd 04 09:08 PM


All times are GMT +1. The time now is 10:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"