IF function driving me crazy

Beau the dog

Board Regular
Joined
Mar 8, 2021
Messages
72
Office Version
  1. 365
Platform
  1. Windows
In my head this seems so basic, but I don't understand why this isn't working.

Ok, so in column D under service hours, the values are reached by using a simple VLOOKUP referencing the table E2-F5

In cell H9 the value is reached by using this formula: =text(G9-F9,"h"), and then pulled down to cell H10. This is to determine the time taken to complete the job.

Basically I am trying to show if a job was completed within the allotted time. So I use the following IF formula: =IF(H9<=D9,"Yes","No")

I'm just trying to get the formula to work, so I set the times so one has failed and one has succeeded. But it doesn't work! Is it because I am referencing two cells that already have formula in them? Picture attached for reference, and the cells are formatted to 'general'.

Thanks in advance for any help given.
 

Attachments

  • SnipImage.JPG
    SnipImage.JPG
    66.3 KB · Views: 7

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi & welcome to MrExcel.
Your values in col H are text & not numbers which is probably why you get the error.
Whilst you should really have col H as numbers, this should get round the problem
Excel Formula:
=IF(VALUE(H9)<=D9,"Yes","No")
 
Upvote 0
Hi & welcome to MrExcel.
Your values in col H are text & not numbers which is probably why you get the error.
Whilst you should really have col H as numbers, this should get round the problem
Excel Formula:
=IF(VALUE(H9)<=D9,"Yes","No")

I had a feeling it was s simple fix! But I guess they're only easy if you know it!!

Yes that worked, thank you.
 
Upvote 0
You're welcome & thanks for the feedback.

You would be better of using
Excel Formula:
=ROUNDDOWN((G9-F9)*24,0)
in H9, that gets rid of the problem.
 
Upvote 0

Forum statistics

Threads
1,215,593
Messages
6,125,715
Members
449,254
Latest member
Eva146

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