Odd and even number with conditional formatting

snekkis

New Member
Joined
Feb 11, 2013
Messages
16
Please, can someone help me with this one:

I have a cell containing a 11 digit number. I would like to give another cell a conditional formatting based upon the 3rd digit from the right in this 11 digit number, or 9th from the left if you like. The formatting should be one for odd number, and one formatting for the even.

Thanks!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Conditional Formating -

try this formula
(if your value is in column A)

=[FONT=&quot]ISEVEN[/FONT](Right(A2,3))
 
Upvote 0
I've tried former and latter function, ..
.. but your sample file only seems to demonstrate the former, which doesn't exactly address your request as I understand it.
Post #3 {& the corresponding ISODD()} work for me.

Excel Workbook
AB
1Col 1Col 2
233925142313
320320350924
424545965435
554891151099
686693691589
787632523741
894525420563
976472499676
1043412274528
1161952221154
Ark1 (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B21. / Formula is =ISODD(MID(A2,9,1))Abc
B22. / Formula is =ISEVEN(MID(A2,9,1))Abc
 
Last edited:
Upvote 0
Still not working, but if this works on your end, it has to do with my Norwegian Excel version. I've put in the equivalent formula in Norwegian, and I believe it has something to do with that. I have English Excel at home, will try there.

Thanks!
 
Upvote 0
Last edited:
Upvote 0
I've tried former and latter function, but there is a non consistency in the formatting in both of them. I don't get it. Here is a link to one example of mine. I will delete the link when this is solved
https://drive.google.com/file/d/0Bxz42nal2vNjM2ZxcUdrNU9ZNEdHV1V1WEZVZ1Qyd0Rnallr/view?usp=sharing

Two things:

First you have applied the formatting to the whole of column B, so you have to use A1 in the formula, not A2.
Second, the formula is testing the last three digits, not just the third to last digit.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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