help required in completing the code

  • Thread starter deepika :excel help
  • Start date
D

deepika :excel help

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top