Help with IF formula with Negative Time YES OR NO

Lukma

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

Please can someone help with a formula with IF for YES or NO in Column J in my Data Sheet

I have a Time in Column I so i need formula is Column J display the time with negative sign as YES and without negative and NO
but some how i cant seem to get it with my formula in Column J

Appreciate a help with This

Regards


OSMS-Onshore Jetty Operations vessels Tracking.xlsx
ABCDEFGHIJ
1NO
2YES
3Mus NumSupply VesselVessel Arrive Fairway Buoy Date&TimeMUS Channel Status C/OManifest Date & TimeManifest passed On TimeControl Tower Permission Date & TimePerm Granted On Time Permission Hours YES OR NO
41154CECILIE-K01/05/23 12:40NO01/05/23 12:44Met0:04Yes
51155Z-OCEAN01/05/23 14:3001/05/23 13:40NO01/05/23 13:51Met0:11Yes
61156SWISSCO RUBY02/05/23 06:0001/05/23 21:57YES01/05/23 22:40Met-07:20Yes
71157LCT-SHEWELEH01/05/23 16:0001/05/23 15:00NO01/05/23 18:27Not Met3:27Yes
81158A-RANGER01/05/23 20:0001/05/23 16:57YES01/05/23 17:00Met-03:00Yes
91159ADNOC-S0201/05/23 21:1001/05/23 20:14NO02/05/23 03:00Not Met6:46Yes
Sheet1
Cell Formulas
RangeFormula
H4:H9H4=IFERROR(IF(G4>E4+TIME(3,0,0),"Not Met","Met"),"")
I4:I9I4=IF(IF(AND(F4=$A$1,G4>C4-TIME(3,0,0)),G4-E4,IF(AND(F4=$A$2,G4>C4-TIME(3,0,0)),G4-C4,G4-C4))<0,"-"&TEXT(ABS(IF(AND(F4=$A$1,G4>C4-TIME(3,0,0)),G4-E4,IF(AND(F4=$A$2,G4>C4-TIME(3,0,0)),G4-C4,G4-C4))),"hh:mm"),IF(AND(F4=$A$1,G4>C4-TIME(3,0,0)),G4-E4,IF(AND(F4=$A$2,G4>C4-TIME(3,0,0)),G4-C4,G4-C4)))
J4:J5,J7:J9J4=IF(I4>0,"Yes","No")
J6J6=IF(I6>"","Yes","No")
F4:F9F4=IFERROR(IF(E4>C4-TIME(3,0,0),"NO","YES"),"")
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
as that is text try
=IF(LEFT(I4,1)="-","Yes","No")

Book21
ABCDEFGHIJ
1NO
2YES
3Mus NumSupply VesselVessel Arrive Fairway Buoy Date&TimeMUS Channel Status C/OManifest Date & TimeManifest passed On TimeControl Tower Permission Date & TimePerm Granted On Time Permission Hours YES OR NO
41154CECILIE-K45047.5278NO45047.5306Met0.002777778No
51155Z-OCEAN45047.604245047.5694NO45047.5771Met0.007638889No
61156SWISSCO RUBY45048.2545047.9146YES45047.9444Met-07:20Yes
71157LCT-SHEWELEH45047.666745047.625NO45047.7688Not Met0.14375No
81158A-RANGER45047.833345047.7063YES45047.7083Met-03:00Yes
91159ADNOC-S0245047.881945047.8431NO45048.125Not Met0.281944444No
Sheet1
Cell Formulas
RangeFormula
H4:H9H4=IFERROR(IF(G4>E4+TIME(3,0,0),"Not Met","Met"),"")
I4:I9I4=IF(IF(AND(F4=$A$1,G4>C4-TIME(3,0,0)),G4-E4,IF(AND(F4=$A$2,G4>C4-TIME(3,0,0)),G4-C4,G4-C4))<0,"-"&TEXT(ABS(IF(AND(F4=$A$1,G4>C4-TIME(3,0,0)),G4-E4,IF(AND(F4=$A$2,G4>C4-TIME(3,0,0)),G4-C4,G4-C4))),"hh:mm"),IF(AND(F4=$A$1,G4>C4-TIME(3,0,0)),G4-E4,IF(AND(F4=$A$2,G4>C4-TIME(3,0,0)),G4-C4,G4-C4)))
J4:J9J4=IF(LEFT(I4,1)="-","Yes","No")
F4:F9F4=IFERROR(IF(E4>C4-TIME(3,0,0),"NO","YES"),"")
 
Upvote 0

Forum statistics

Threads
1,223,883
Messages
6,175,168
Members
452,615
Latest member
bogeys2birdies

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