Retrouver une cellule contenant une certaine heure

Bonjour à tous,

Dans un tableau Excel, j'ai des cellules au format JJ/MM/AAAA hh:mm:ss.

Je souhaiterais retrouver toutes les cellules contenant un horaire commencent par 00h ou 12h.

Auriez-vous une solution ?

7heures.xlsx (26.28 Ko)

Bonjour,

Avec une MFC

17heures.xlsx (26.98 Ko)

Salut Mdu,

Salut M12,

Salut le forum !

Ci-joint ton fichier modifié qui va colorer tes cellules qui commence par 00h ou 12h via une macro

7pour-mdu.xlsm (36.73 Ko)

Bonjour,

Une autre proposition VBA.

Sub ColorCells()
Dim rng As Range, Cell As Range
    With ActiveSheet
        Set rng = .Cells(1).CurrentRegion
        For Each Cell In rng
            If IsDate(Cell) Then
                If Hour(Cell) = 0 Or Hour(Cell) = 12 Then Cell.Interior.Color = 65535
            End If
        Next Cell
    End With
End Sub

Bonjour,

une autre MFC :

=ET(A1<>"";MOD(HEURE(A1);12)=0)

eric

Merci à tous pour vos réponses.

C'est parfait.

Bonne journée

Rechercher des sujets similaires à "retrouver contenant certaine heure"