Help with a Formula of IF greater than or Less than or with a Negative time sign

Lukma

Active Member
Joined
Feb 12, 2020
Messages
259
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hello Friend

Please I need a little help with my formula which i am having doubts about
In Column E, I have my Arrive Date & Time for Vessel at Fairbouy, In Column G, I have my Manifest passed date & Time , and I have got the total Hours in Column H,
i have your formula in Column H, for negative sign time, meaning if the Manifest Passed Date and Time is early thank arrival date of Vessel at Fairbouy

Now i need Column H with a Formula, IF Column H is Greater than 3 hours it should give me Not Met
And IF column H is Less than 3 hours or With a Negative Sign it should give me Met

I also Have Column J Permission Date and Time which I also Need a formula in Column L with the same formula IF Column K is Greater than >3 hours Not Met
and
if Less than < 3 hours or with a Negative sign as Met

Appreciate a help to resolve this

2023-Master Data Onshore Jetty Operation Tracking.xlsx
ABCDEFGHIJKL
1WK RptMonthMus NumSupply VesselVessel Arrived FWB Date&TimeChanel Status Manifest Date & TimeMnfst On TimeMnfst Delay HoursControl Tower Permission Date & TimeTower Perm On TimeTower Perms Delay Hours
2 01153-MADNOC-23027/04/23 14:2527/04/23 14:300:05Met27/04/23 19:305:00Not Met
3 01154CECILIE-K01/05/23 10:0001/05/23 12:402:40Not Met01/05/23 12:440:04Met
4 01155Z-OCEAN01/05/23 14:3001/05/23 13:40-0:50Met01/05/23 13:510:11Met
5 01156SWISSCO RUBY02/05/23 06:0001/05/23 21:56-8:04Met01/05/23 22:400:44Met
6 01157LCT-SHEWELEH01/05/23 16:0001/05/23 17:371:37Not Met01/05/23 18:270:50Met
7 01158A-RANGER01/05/23 20:0001/05/23 16:57-3:03Met01/05/23 17:000:03Met
8 01159ADNOC-S0201/05/23 21:1001/05/23 20:14-0:56Met02/05/23 03:006:46Not Met
9 01160ADNOC-81001/05/23 01:5001/05/23 19:5518:05Not Met01/05/23 20:080:13Met
10 01161ADNOC-51101/05/23 22:1001/05/23 21:21-0:49Met01/05/23 21:380:17Met
11 01162SK MAINSTAY02/05/23 06:0502/05/23 01:59-4:06Met02/05/23 05:463:47Not Met
12 01163MUTAWA-40201/05/23 10:0002/05/23 01:3115:31Not Met02/05/23 01:500:19Met
13 01164ADNOC-51202/05/23 08:1002/05/23 05:19-2:51Met02/05/23 05:500:31Met
14 01165ADNOC-81202/05/23 09:4002/05/23 09:13-0:27Met02/05/23 09:220:09Met
15 01166Z-POWER02/05/23 04:2002/05/23 11:146:54Not Met02/05/23 11:490:35Met
Sheet4
Cell Formulas
RangeFormula
A2:A15A2=IFERROR(EOMONTH(K40,-1)+1,"")
B2:B15B2=IF(WEEKDAY(K40,2)>7,"",WEEKNUM(K40)-WEEKNUM(DATE(YEAR(K40),MONTH(K40),1))+1)
H2:H15H2=IFERROR(IF((G2-E2)>0,(G2-E2),TEXT(ABS(G2-E2),"-h:mm")),"")
I2:I15,L2:L15I2=IF(OR(LEFT(H2,1)="-",H2<3/48),"Met","Not Met")
K2:K15K2=IFERROR(IF((J2-G2)>0,(J2-G2),TEXT(ABS(J2-G2),"-h:mm")),"")
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
IF Column H is Greater than 3 hours it should give me Not Met
And IF column H is Less than 3 hours or With a Negative Sign it should give me Met
With your existing column I formula, just change 3/48 to 3/24 since there are only 24 hours in a day. ;)
Excel Formula:
=IF(OR(LEFT(H2,1)="-",H2<3/24),"Met","Not Met")

Similar with column L
Excel Formula:
=IF(OR(LEFT(K2,1)="-",K2<3/24),"Met","Not Met")
 
Upvote 0
Solution
With your existing column I formula, just change 3/48 to 3/24 since there are only 24 hours in a day. ;)
Excel Formula:
=IF(OR(LEFT(H2,1)="-",H2<3/24),"Met","Not Met")

Similar with column L
Excel Formula:
=IF(OR(LEFT(K2,1)="-",K2<3/24),"Met","Not Met")
Dear Peter

Thanks so much, I really appreciate your support which I really needed now.

The forum has been so helpful with my current state of data and formula.

many grace to you all

Thanks
 
Upvote 0
With your existing column I formula, just change 3/48 to 3/24 since there are only 24 hours in a day. ;)
Excel Formula:
=IF(OR(LEFT(H2,1)="-",H2<3/24),"Met","Not Met")

Similar with column L
Excel Formula:
=IF(OR(LEFT(K2,1)="-",K2<3/24),"Met","Not Met")
Hi peter

One last issue I need a few updates with my formula if there is no time I need it to remain Blank I tried IFERROR but still shows met in a cell with no time as I need to drag the formula down


Regards
 
Upvote 0
if there is no time
I assume that means that the vessel has not arrived so column E would be blank?
Excel Formula:
=IF(E2="","",IF(OR(LEFT(H2,1)="-",H2<3/24),"Met","Not Met"))

If that is not the case then please give us some sample data that reflects what you have/want.
 
Upvote 0
Dear Peter

Thanks a million,
perfect just the way I needed things to run my work runs easier now.

Regards
 
Upvote 0
You are very welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,194
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top