Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
in this code , i have sorted and merged cells . Now i have to ck if there is
only 9 hours allocated per day per individual.. if 9 hours is already planned during a day for an individual tehn teh distributin of work has to happen from teh next day... how do i proceed.. ina week only 5 days are there on sheet. 'DISTRIBUTION OF ESTIMATE Dim estimate As Integer estimate = Cells(j, 12).value - Cells(j, 13).value ' a= the given planned st date from WAS 'b= friday date Dim a As Date Dim b As Date Dim k As Variant Dim co As Integer Cells(j, 7).Select a = Range("H" & j).value b = Sheets("FTP").Cells(1, 10).value k = DateDiff("d", a, b) co = 5 - k While estimate 9 And co <= 10 Sheets("FTP").Cells(I, co + 6).value = 9 estimate = estimate - 9 co = co + 1 Wend If estimate <= 9 Then Sheets("FTP").Cells(I, co + 6) = estimate End If 'END OF DISTRIBUTION I = I + 1 End If j = j + 1 Wend |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Completing a Chart | Charts and Charting in Excel | |||
Completing Formula in Vba | Excel Discussion (Misc queries) | |||
Code required for VLookup returning #NA | Excel Discussion (Misc queries) | |||
Need some help completing this Formula | Excel Worksheet Functions | |||
Auto Complete not completing | Excel Discussion (Misc queries) |