Conitional Formating

Excel Jr

New Member
Joined
Aug 17, 2018
Messages
26
Hi,

I have a huge dataset and I need to apply conditional formatting in a very strange and complex way. The data is a mix of hard coded and calculated prices. I need a formula that will apply formatting only if the cell ends with an 5 in the second decimal place (20.55, 5.05, 42.95, etc.). I've tried a combination of round, if, countif with wildcards and I honestly don't understand intermediate conditional formatting, it's so basic compared to all the other features. VBA is a viable solution. I'd be greatful for any solution, but I can't go through and change the formulas on the sheet to round beforehand. It needs to be taken care of separately.

Thanks as Always!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I would have thought =RIGHT(A1,1)=5 would have worked, but to no avail. Anyway, perhaps this?

=ISODD(A1/.05)=TRUE

Edit: Hmm, nevermind, this will return true for values .05-.09.

Edit #2 : So, if anyone else reading, maybe you have some insight as to why =RIGHT(A1,1)=5 doesn't work? I tried =RIGHT(A1,1)<>5 and that worked... but not the other way around.
 
Last edited:
Upvote 0
Annnnnd never mind, complete dumb dumb this morning.

Try this!

=RIGHT(A1,1)="5"
 
Upvote 0
If all your values are only taken out to two places then this formula (adjusted for whatever cell references you need) will work as a conditional formatting rule:

Code:
=NUMBERVALUE(RIGHT(E2,1))=5

If not, this works regardless of how many values before or after the decimal:

Code:
=NUMBERVALUE(RIGHT(MID(E10,SEARCH(".",E10),3),1))=5

The only reason I'd use these instead of the suggested rounding approach above is if I didn't want to round the values.
 
Last edited:
Upvote 0
with comments like that I'm :outtahere:

Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
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