You said if you enter a number in B then Status is "Left Early"
Is this what you mean, it keeps the original entry
You said if you enter a number in B then Status is "Left Early"
Is this what you mean, it keeps the original entry
If you enter a number in Out my code adds left early, which to me makes sense.
Surely if you enter a number in "In" then you need Arrived Late and the time?
Surely if you enter a number in "In" then you need Arrived Late and the time?
Exactly.
and now both of you have resolved my issue.
Thanks
I'm still not sure what you want, maybe this
Let me try to understand you again There are 4 columns in Sheet
1 contains Date
2 contains In
3 contains Out
4 contains Comments
I just want that if anyone comes late and mention ISNUMBER or TIME like 9:00AM or 9.00 then it will will be consider as "Late" and code will write this "Date-Late-Comments"
if someone goes early then code should write in 2nd row the 2nd status "Date-Early-Comments"
Same for Leave and Absent.
I ave tried a lot to understand below code and requested you to modify this but now i have to understand your code that is good but still your code is missing.
Here is below the example that i want.
[Blocked Image: https://www.ozgrid.com/forum/core/index.php?attachment/1228855-pasted-from-clipboard-png/]
Sub Do_It()
With Sheets("data")
f = .Cells(.Rows.Count, "F").End(xlUp).Row
If f > 3 Then .Range("F4:H" & f).ClearContents
.Range("F3") = .Range("B1")
f = 3
For y = 3 To 33
a = .Cells(y, "A")
b = .Cells(y, "B")
c = .Cells(y, "C")
d = .Cells(y, "D")
If b <> Empty And b <> Empty Then
Select Case b
Case "a", "A"
txt = "Absent "
Case "l", "L"
txt = "Late "
Case Else
txt = "Leave "
End Select
f = f + 1
.Cells(f, "F") = Format(a, "ddd dd-mmm-yyyy")
.Cells(f, "G") = txt
.Cells(f, "H") = d
End If
Next y
End With
End Sub
Display More
I really appreciate you helped me a lot and still helping Thanks for the favor.
What do mean write in the second row? You have one row for each day.
I've tried to understand and adapt what you want.
The code that you have posted again makes no sense to me.
What do mean write in the second row? You have one row for each day.
Exactly i have one row but code will write next entry under previous automatically
The code that you have posted again makes no sense to me.
Yeah i know.
Are you saying that you want to add a new day into the table?
No.
I just trying to say that your code is still not adding date when i mention any number in "Out" it just add that "Arrived Late" code should mention "Date-Status(Late,Early,Absent,Leave)-Comments for each entry.
Is this what you mean?
Thanks its working perfectly.
That's good news. Glad we got there in the end
If you are planning to use this by clearing the data for another month I have changed the formulas so that they update based on the date entered in B1
Yeah it took a lot time.
Thanks.
Don’t have an account yet? Register yourself now and be a part of our community!