if question

Peter1973

Well-known Member
Joined
May 13, 2006
Messages
957
Im trying to get a simple if formula to work but it keep retuning false what have I done wrong ?

=IF(C6="12:30",20,IF(C6="11:00",25))

I need it to look in c6 if it is 12:30 return the value 20 if it is 11:00 return 25.

Any help appreciated
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try: =IF(C6="12:30"*1,20,IF(C6="11:00"*1,25))

You need to coerce the time strings into values.

Dom
 
Upvote 0
Does C6 contain formatted time values?

If so, this may be your problem

TRY

Code:
=IF(TEXT(C6,"HH:MM")="12:30",20,IF(TEXT(C6,"HH:MM")="11:00",25))
 
Upvote 0

Forum statistics

Threads
1,215,261
Messages
6,123,939
Members
449,134
Latest member
NickWBA

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