CONDITIONAL FORMATTING: Cells with 32nd fractions

itr674

Well-known Member
Joined
Apr 10, 2002
Messages
1,790
Office Version
  1. 2016
Platform
  1. Windows
Is there a shorter way to write the below conditional formatting formula for cells that contain 32nds?

=OR (E37=3/32, E37=5/32, E37=7/32, E37=9/32, E37=11/32, E37=13/32, E37=15/32)

I tried MOD(cell reference, 1/32)=0 but it is highlighting cells that are 32nds.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
This is as simple as I could get it:
Excel Formula:
=AND(A1>1/32,A1<=15/32,ISODD(INT(32*A1)),MOD(A1,1/32)=0)

$scratch.xlsm
ABCDEFGHIJKLMNOPQRS
1 1/32 1/16 3/32 1/8 5/32 3/16 7/32 1/4 9/32 5/16 11/32 3/8 13/32 7/16 15/32 1/2 17/32 9/16 19/32
Sheet19
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:S1Expression=AND(A1>1/32,A1<=15/32,ISODD(INT(32*A1)),MOD(A1,1/32)=0)textNO
 
Upvote 0
This is as simple as I could get it:

=AND(A1>1/32,A1<=15/32,ISODD(INT(32*A1)),MOD(A1,1/32)=0)
65StringJazzer, wow that was quick and it worked but have one issue.

I have two cells, one calculates the decimal version of the 32nd, and another cell shows the fraction version, and I just want to highlight the fraction version, and those cells are formatted as ##/##
 
Upvote 0
Correction to last line of original post:

I tried MOD(cell reference, 1/32)=0 but it is highlighting cells that are NOT 32nds.
 
Upvote 0
I have two cells, one calculates the decimal version of the 32nd, and another cell shows the fraction version, and I just want to highlight the fraction version, and those cells are formatted as ##/##
There is no built-in function that can tell you whether the cell is formatted as a fraction, so conditional formatting can't distinguish between these two cells. I thought the CELL function would do it but both cells return "G" for "format".
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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