# Numeric value as a target for [mm]:ss

#### qwerty78

##### New Member
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
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)

= 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
Thanks for the input, I have resolved this issue in another way similar to your first formula.

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

### 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...