Want Tick mark and X-mark using current date and current time using Excel formula

0 votes

I have four tasks each day, two of which must be finished by 10 AM and the remaining two before 5:30 PM. current day and time must be used. Therefore, if the time today crosses 10 AM, I want the "tick" mark symbol to be displayed, and if not, the "X" mark symbol. This has to continue for a week.

Therefore, if my Excel document is open at all times, it should be updated in accordance with the aforementioned circumstance.

output result to be like in this image

Nov 10, 2022 in Others by Kithuzzz
• 38,010 points
580 views

1 answer to this question.

0 votes

I likewise use a checkmark to indicate a work is finished, but I also include a time stamp many columns over. By clicking on a cell in Column B or C, my modified script inserts an "a" using a Marlett font, which creates a checkmark if before 10 am, otherwise, an "r" creates an X.

Perhaps this can be changed to fit your needs by adding a new section for 17:30. Since VBA is "dynamic" on cell changes, I prefer using it over a formula (just clicking in the cell). The check mark or X is removed by clicking in and out of the same cell once again.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

 'Mark Task completed if finished before 10 am

  If Target.Cells.Count > 1 Then Exit Sub

    'Only looking at column B & C, rows 3 thru 31
    If Not Intersect(Target, Range("B3:C31")) Is Nothing Then

        Target.Font.Name = "Marlett"

            If Target = vbNullString Then
               If Time() < "10:00:00" Then
                   Target = "a"
                Else
                   Target = "r
                End If 
            Else

                Target = vbNullString


            End If
      End If
End Sub`

Hope this helps you.

answered Nov 10, 2022 by narikkadan
• 63,420 points

Related Questions In Others

0 votes
1 answer

How do I get the current date and time in PHP?

The time would go by your server ...READ MORE

answered Feb 16, 2022 in Others by Aditya
• 7,680 points
532 views
0 votes
1 answer

How to get current time and date in Android

In order to get the current date ...READ MORE

answered Feb 23, 2022 in Others by Aditya
• 7,680 points
1,749 views
0 votes
1 answer

Excel plot against a date time x series [closed]

Try using an X-Y Scatter graph with ...READ MORE

answered Oct 22, 2022 in Others by narikkadan
• 63,420 points
356 views
0 votes
1 answer

Excel Formula which places date/time in cell when data is entered in another cell in the same row

Here's how to accomplish things in another ...READ MORE

answered Dec 11, 2022 in Others by narikkadan
• 63,420 points
827 views
0 votes
1 answer

Calculate Birthdate from an age using y,m,d in Excel

Hello, yes u can find your birthdate using ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,670 points
1,463 views
0 votes
1 answer

Calculate Birthdate from an age using y,m,d in Excel

Hi To Calculate the date, we can ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,670 points
1,495 views
0 votes
0 answers

Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

Feb 17, 2022 in Others by Edureka
• 13,670 points
738 views
0 votes
1 answer

IF - ELSE IF - ELSE Structure in Excel

In this case, you can use nested ...READ MORE

answered Feb 18, 2022 in Others by gaurav
• 23,260 points
2,505 views
0 votes
1 answer

IF formula to compare a date with current date and return result

You can enter the following formula in ...READ MORE

answered Sep 27, 2022 in Others by narikkadan
• 63,420 points
595 views
0 votes
1 answer

Excel formula to check date within this week and last week

Assuming the first date in A2 try this formula ...READ MORE

answered Sep 29, 2022 in Others by narikkadan
• 63,420 points
1,435 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP