if question

Peter1973

Well-known Member
Joined
May 13, 2006
Messages
933
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
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Domski

Well-known Member
Joined
Jan 18, 2005
Messages
7,292
Try: =IF(C6="12:30"*1,20,IF(C6="11:00"*1,25))

You need to coerce the time strings into values.

Dom
 

Weaver

Well-known Member
Joined
Sep 10, 2008
Messages
5,196
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))
 

Watch MrExcel Video

Forum statistics

Threads
1,122,649
Messages
5,597,368
Members
414,139
Latest member
okela0

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
Top