I
Inder
i have tried to put a chunk of code ... but i m unable
to make it fit as per my problem. can u help me out!
My scenario is as follows:
PunchDate DateIn Timein DateOut Timeout Shift Dept Reg LCh OT
DT BR Total HWH Abst Remarks
The above r the columns of the Excel report generated,
i have shown them in 2 rows, otherwise all these
columns r in one row only and r generated from A-Q in
Excel sheet. i want the condition to be enforced on
TimeIn column and display the result of the condition
in a new column which shud be generated after the last
columns i.e. 'Remarks' . And Also it shud affect all the roecords till
the end of the sheet!
i tried to put on a code... but i cudn't make it! i m
doin like this... i know i m doin something stupid.
Dim MyCell As Object
For Each MyCell In Range(Cells(3, 7), Cells(3,
7).End(xlDown)).Cells
If MyCell.Value > TimeSerial(10, 0, 0) Then
MyCell.Offset(0, 1).Value = TimeSerial(11, 0, 0)
Else
MyCell.Offset(0, 1).Value = ""
End If
Next
please help me out!
thanx n regards
Inder
to make it fit as per my problem. can u help me out!
My scenario is as follows:
PunchDate DateIn Timein DateOut Timeout Shift Dept Reg LCh OT
DT BR Total HWH Abst Remarks
The above r the columns of the Excel report generated,
i have shown them in 2 rows, otherwise all these
columns r in one row only and r generated from A-Q in
Excel sheet. i want the condition to be enforced on
TimeIn column and display the result of the condition
in a new column which shud be generated after the last
columns i.e. 'Remarks' . And Also it shud affect all the roecords till
the end of the sheet!
i tried to put on a code... but i cudn't make it! i m
doin like this... i know i m doin something stupid.
Dim MyCell As Object
For Each MyCell In Range(Cells(3, 7), Cells(3,
7).End(xlDown)).Cells
If MyCell.Value > TimeSerial(10, 0, 0) Then
MyCell.Offset(0, 1).Value = TimeSerial(11, 0, 0)
Else
MyCell.Offset(0, 1).Value = ""
End If
Next
please help me out!
thanx n regards
Inder