ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   help required in completing the code (https://www.excelbanter.com/excel-discussion-misc-queries/177891-help-required-completing-code.html)

deepika :excel help[_2_]

help required in completing the code
 
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



All times are GMT +1. The time now is 09:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com