Hi Nelson,
Originally Posted by
nelsondavid
..i need normal OT and Holiday OT to appear exactly in cell G34 and J34 ...
I think you can see what part of the code determines where the output goes
Code:
'3f) Paste out final Totals and days to current Worksheet
Let wsStear.Range("G34").Value = NOHrsV2 * 24 'Normal Overtime is held in Array as fraction of a day
Let wsStear.Range("J34").Value = HOHrsV2 * 24 'Holiday Overtime is held in Array as fraction of a day
Let wsStear.Range("C34").Value = TDays ' The constant value of Total days is simply added to cell C34
'3g) Normal Hrs ( Column I ) and Overtime Hrs ( Column J ) are changed
Code:
'3f) Paste out final Totals formulas and days to current Worksheet
Let wsStear.Range("G35").Value = "=SUMIF(K1:K" & lr & ",""N"",J1:J" & lr & ")*24"
Let wsStear.Range("J35").Value = "=SUMIF(K1:K" & lr & ",""H"",J1:J" & lr & ")*24"
Let wsStear.Range("C34").Value = TDays ' The constant value of Total days is simply added to cell C34
'3g) Normal Hrs ( Column I ) and Overtime Hrs ( Column J ) are changed ' And can paste out help column if you like
I am sure you can understand how to modify to change which cells are used for where the total appear
_............................................
Originally Posted by
nelsondavid
.... Can i use the same code for every month ...
Yes..
Originally Posted by
nelsondavid
. if yes what changes i need to do from my end..
..The code is not in any way dependant on any month information......There is no reason that I can see to need to change anything..
Originally Posted by
nelsondavid
....what changes i need to do from my end..
You should not need to change your end, leave it alone, at least as far as any effect on the Months are concerned
_................................................. .......
Originally Posted by
nelsondavid
...I have around 800 sheets ...will the code work on all sheets in one go...
The code is designed to work on multiple worksheets.
Obviously I only tested it with two.
If I were you, I would test it first with a larger amount, 10, 30, 60, .100 .......etc.. then finally 800 etc.
_................................................. ...
In my opinion, it is very important that you try to understand the code...
Alan.
P.s.
Originally Posted by
nelsondavid
..The code seems to be working fine..
We have given you 2 codes
From Alan
http://www.excelfox.com/forum/showth...age2#post10066
From Alan and Admin
http://www.excelfox.com/forum/showth...age2#post10072
Bookmarks