Slicing text conditional formatting

Kenyon Graham

New Member
Joined
Jul 12, 2017
Messages
2
Hi,

I am a little foxed.

I have a cell entry 08/10

Two numbers separated by a forward slash as text.

The idea is that is a number is less than 10 its filled red if not green if there is an entry

I was hoping that the following screen shot would do the trick, but alas somethings not quite right.

Could I have some guidance on this preferably in excel.......
 
Last edited by a moderator:

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Welcome to the Board!

If the idea is to just check if the first number is less than the second, here is a Conditional Formatting formula you could use to check that (example on cell O1):
Code:
=LEFT(O1,SEARCH("/",O1)-1) < MID(O1,SEARCH("/",O1)+1,LEN(O1))
 
Upvote 0
Thanks Joe4,

Your formula does work, however i was looking to have a fixed value in this case 10 ie <10 turns red >10 turns green.

=LEFT(AT58,SEARCH("/",AT58)-1) < MID(AT58,SEARCH("/",AT58)+1,LEN(AT58))

by slicing you are picking up only 1 digit(character), the entry will have typically 12/14, 08/10 etc the 0 is added to give 5 charaters for future processing.

=LEFT(AT58,SEARCH("/",AT58)-1) < 10 does not seem to work.

any thoughts

Kenyon
 
Upvote 0
By default, LEFT functions return strings, not numbers. You need to do some sort of mathematical function on them to convert to numbers.
So try:
Code:
=(LEFT(AT58,SEARCH("/",AT58)-1)*1) < 10
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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