Note: The other languages of the website are Google-translated. Back to English
Se connecter  \/ 
x
or
x
INSCRIPTION  \/ 
x

or

Comment vérifier si le temps se situe entre deux heures dans Excel?

Dans Excel, comment pouvez-vous vérifier si une heure spécifique se situe entre deux heures données? Les vérifier un par un fera perdre beaucoup de temps, ici, je vais vous présenter quelques formules simples pour résoudre ce travail.

Vérifier si une heure spécifique est comprise entre deux heures données avec des formules


flèche bleue bulle droite Vérifier si une heure spécifique est comprise entre deux heures données avec des formules

Par exemple, j'ai deux colonnes d'heures qui sont l'heure de début et l'heure de fin dans la colonne A et la colonne B séparément, maintenant je veux vérifier si l'heure dans la colonne C est entre la plage de temps dans la colonne A et la colonne B comme ci-dessous la capture d'écran montrée :

doc vérifier si le temps entre les temps 1

Les formules suivantes peuvent vous aider à identifier si l'heure spécifique se situe entre deux heures, procédez comme suit:

Entrez l'une des formules suivantes dans une cellule vide à côté de vos données où vous souhaitez afficher le résultat:

= SI (C2 = MEDIANE (A2, B2, C2), "Oui", "Non")

=IF(AND(C2>=MIN(A2:B2),C2<=MAX(A2:B2)),"YES","NO")

Et puis faites glisser la poignée de remplissage vers les cellules auxquelles vous souhaitez appliquer cette formule, et le temps si entre les deux temps donnés a été identifié, s'il est entre deux fois, un Oui sera affiché, si ce n'est pas entre les deux fois, un Non sera affiché, voir capture d'écran:

doc vérifier si le temps entre les temps 2

A Noter: Dans les formules ci-dessus, C2 est l'heure précise que vous souhaitez vérifier, et A2 et B2 Les cellules contiennent-elles les deux heures sur lesquelles vous souhaitez vérifier.


Les meilleurs outils de productivité de bureau

Kutools for Excel résout la plupart de vos problèmes et augmente votre productivité de 80%

  • Réutilisation: Insérer rapidement formules complexes, graphiques et tout ce que vous avez utilisé auparavant; Crypter les cellules avec mot de passe; Créer une liste de diffusion et envoyer des e-mails ...
  • Barre Super Formula (modifiez facilement plusieurs lignes de texte et de formule); Disposition de lecture (lire et modifier facilement un grand nombre de cellules); Coller dans la plage filtrée...
  • Fusionner les cellules / lignes / colonnes sans perdre de données; Contenu des cellules divisées; Combiner des lignes / colonnes en double... Empêcher les cellules en double; Comparer les gammes...
  • Sélectionnez Dupliquer ou Unique Lignes; Sélectionnez les lignes vides (toutes les cellules sont vides); Super Find et Fuzzy Find dans de nombreux classeurs; Sélection aléatoire ...
  • Copie exacte Plusieurs cellules sans changer la référence de formule; Créer automatiquement des références à plusieurs feuilles; Insérer des puces, Cases à cocher et plus encore ...
  • Extrait du texte, Ajouter du texte, Supprimer par position, Supprimer l'espace; Créer et imprimer des sous-totaux de pagination; Conversion entre le contenu et les commentaires des cellules...
  • Super filtre (enregistrer et appliquer des schémas de filtrage à d'autres feuilles); Tri avancé par mois / semaine / jour, fréquence et plus; Filtre spécial par gras, italique ...
  • Combiner des classeurs et des feuilles de travail; Fusionner les tableaux en fonction des colonnes clés; Diviser les données en plusieurs feuilles; Conversion par lots xls, xlsx et PDF...
  • Plus de 300 fonctionnalités puissantes. Prend en charge Office / Excel 2007-2019 et 365. Prend en charge toutes les langues. Déploiement facile dans votre entreprise ou organisation. Essai gratuit de 30 jours. Garantie de remboursement de 60 jours.
onglet kte 201905

Office Tab apporte une interface à onglets à Office et simplifie considérablement votre travail

  • Activer l'édition et la lecture par onglets dans Word, Excel, PowerPoint, Publisher, Access, Visio et Project.
  • Ouvrez et créez plusieurs documents dans de nouveaux onglets de la même fenêtre, plutôt que dans de nouvelles fenêtres.
  • Augmente votre productivité de 50% et réduit des centaines de clics de souris chaque jour!
bas de cabine
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    HST · 1 years ago
    Hi, I am comparing hundreds of thousands of lines of data (for the first time) and needed an equation that that compares time between two of he columns. However, I cannot get away with an IF statement using A3<>F3 because the times in A3 are about 1 second off. Rather I just need to the nearest minute. Any help?
  • To post as a guest, your comment is unpublished.
    Alandrea1986 · 1 years ago
    I am in need of assistance. I have been pulling my hair out over the last month trying to figure out a way to make my life simpler. I am not even sure if it can be done because I can not find anything on how to do it. My problem is this........ I recently started using a new program to collect data for incoming and outgoing employees. The data readers are sensitive and will sometimes account for an employee multiple times over the course of a couple of minutes. when I export this data into an excel file, it is an absolute nightmare trying to individually delete the extra captures. Using the remove duplicates option helps, but still leaves many duplicate times due to the Seconds in the time being different. Today for example after I removed the duplicates, I still have over 24,000 unique entries that I have to go through to get that data I need. Someone, anyone..... please Help!
  • To post as a guest, your comment is unpublished.
    Maite · 1 years ago
    I am trying to calculate time per day for example I went to the computer lab and logged in for 4hours&35minutes on Monday and Tuesday I logged in on for 2 hours and 10 minutes and Wednesday 3hours and 4 minutes and Thursday for 4 hours and 14 minutes and Friday 1 hour and 15 minutes. Add those total together and get a grand total. I want to be able to keep every minute. No rounding, I know that I have to use the IF function.

  • To post as a guest, your comment is unpublished.
    Yogesh · 1 years ago
    Help me in this, as if there is some time ranges in a day and i have to find out time clashing is there or not. then please suggest some formula!
  • To post as a guest, your comment is unpublished.
    santoshk.rymec@gmail.com · 2 years ago
    Hello I have to find my specific time is in between two times...eg : Start time(AS2) is 23:00:00 and End time(AT2) is 8:00:00, specific time(J2) is 0:02:20, so when i use the formula =IF(AND(J2>=MIN(AS2:AT2),J2<=MAX(AS2:AT2)),"YES","NO") it should show yes as its in between tow times only but its showing no, any help in correcting the formula ?
    • To post as a guest, your comment is unpublished.
      SilverFalcon · 2 years ago
      Hi Santosh, That is similar to my use,I use something along the lines of;

      =IF(AND(C2>=MIN("13:00"),C2<=MAX("13:10")),"YES","NO")
      • To post as a guest, your comment is unpublished.
        Abhishek · 1 years ago
        Hi Silver,


        The formula doesn't work. If I have to enter "13:00" (hours) in each row, why there is formula, this is not making the job any easier.
    • To post as a guest, your comment is unpublished.
      skyyang · 2 years ago
      If your time over midnight, you should apply the below formula:
      =OR(MOD(C1,1)>TIME(23,0,0),MOD(C1,1)<TIME(8,0,0))
      • To post as a guest, your comment is unpublished.
        skyyang · 2 years ago
        In the above formula, C1 is the specific time you want to check for, and the TIME(23,0,0) and TIME(8,0,0) are the two times you want to check between. You should change the references to your need.
        Please try it, hope it can help you!
  • To post as a guest, your comment is unpublished.
    Santosh · 2 years ago
    I have two times here 23:00:00(AS2 Start Time) and 8:00:00(AT2 End Time) and specific time is 0:02:20(J2), so when i use this formula =IF(AND(J2>=MIN(AS2:AT2),J2<=MAX(AS2:AT2)),"YES","NO"), it should come as yes as the specific time is in between our two start and end time but its showing no..any help in correcting this formula
  • To post as a guest, your comment is unpublished.
    Nikkii · 2 years ago
    This isn't working for me when the specific time is =NOW() to display the current time. Any suggestions?
    • To post as a guest, your comment is unpublished.
      skyyang · 2 years ago
      Hello, Nikkii,

      If you enter =now() function to get the current date and time, both date and time are displayed, if you need a formula to get the current time dynamically, you can apply this formula: =MOD(NOW(),1), and then format it as time format. And then, you can use the formula in this article successfully.

      Please try, hope it can help you!
  • To post as a guest, your comment is unpublished.
    chris · 2 years ago
    This doesn't work if you are checking between time values that go after midnight. For example, the formula will return a false if you are checking if 1AM is between 10 PM to 3 AM.
    • To post as a guest, your comment is unpublished.
      skyyang · 2 years ago
      Hi, chris,
      If your time over midnight, you should apply the below formula:
      =OR(MOD(C1,1)>TIME(22,0,0),MOD(C1,1)<TIME(3,0,0))

      In the above formula, C1 is the specific time you want to check for, and the TIME(22,0,0) and TIME(3,0,0) are the two times you want to check between. You should change the references to your need.
      Please try it, hope it can help you!
      • To post as a guest, your comment is unpublished.
        pavel · 1 months ago
        God may bless you! this works for my issue. seeking range between 22:00 and 05:00 in May to Sept, now different range for the rest of the year! i shall split the Spreadsheet. anyway thank you again, mate!!!
      • To post as a guest, your comment is unpublished.
        Yogesh · 1 years ago
        I have these examp. can somebody help as I could not connect with right formula.


        S time E time Adex time Exact( want to check if this is falling under s and e time or not)
        18:30 00:29 20:23:02
        18:30 00:29 20:22:01
        18:30 00:29 23:16:18
        18:30 00:29 23:49:10
        17:30 00:29 18:03:06
        17:30 00:29 18:19:15
        17:30 00:29 18:36:24
        17:30 00:29 18:06:35
        17:30 00:29 18:22:46


      • To post as a guest, your comment is unpublished.
        Lior · 1 years ago
        Hey, if i have the time i eant to check (02:00) is between 15:00 (in the day before) and 06:30. The mod function dosent work, it cant reed the time after 00:00.
        What else can i do?
        Please
      • To post as a guest, your comment is unpublished.
        Laura · 2 years ago
        I have 3 times (arrival, process and departure) which may span midnight, that I want to calculate the difference between. I am getting an error when I try to calculate the time between process and departure where the process is before midnight and the departure is after. For example my arrival time is 21:00, my process time is 23:00 and my departure time is 03:00 the difference should be 4 hours but I'm getting an error. I am using the following formula as I want to highlight where the process time is after the departure time =IF(ISBLANK(G3),"N/A",IF(E3=G3,"PROCESS TIME EQUALS DEPARTURE TIME",IF(E3>G3,E3-G3,IF(E3<G3,"PROCESS TIME AFTER DEPARTURE TIME")))) where E3 is my departure time and G3 is my process time. Any guidance gratefully received.