Numeric value as a target for [mm]:ss

qwerty78

New Member
Joined
Jun 4, 2019
Messages
3
Hi

I'm trying to validate a result where the target is a numeric value but the result from calculation is minutes and seconds

example:

A1= 240 (target minutes)
A2= 195:23 (calculated value between two dates and times)
A3 = if(a2<=a1,"Met","Miss")

I understand the calculated value is really a serial number of time. How can my if statement work. Please
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,749
Hi
Welcome to the board

The time unit in excel is the day. This means that to convert a decimal minute value to excel time you have to divide it by 24 (hours) and by 60 (minutes)

Your formula would be

= if(a2<=a1/24/60,"Met","Miss")

Another way is to use the Time() function:

= if(a2<=TIME(0,a1,0),"Met","Miss")
 
Last edited:

qwerty78

New Member
Joined
Jun 4, 2019
Messages
3
Thanks for the input, I have resolved this issue in another way similar to your first formula.
 

Forum statistics

Threads
1,081,574
Messages
5,359,704
Members
400,545
Latest member
Damntheman30

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top