Conditional Formatting using formula range does not work

pto160

Active Member
Joined
Feb 1, 2009
Messages
482
Office Version
  1. 365
Platform
  1. Windows
I am trying to use conditional formatting using a formula with a range. I am not getting the results that I want. Can you use a formula with a range for conditional formatting:
The condition is numbers with the last two numbers after the decimal point that end in a odd number and any cell that has N.

Book1
ABCDEF
1What I am getting
2156.23NYNTRUE
3180NNN
4192.56YYN
5
6What I want
7156.23NYN
8180NNN
9192.56YYN
Sheet1
Cell Formulas
RangeFormula
F2F2=OR(1*RIGHT(FIXED(A2,2,1),2)>0,C2="N",D2="N",E2="N")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:E4Expression=OR(1*RIGHT(FIXED(A2,2,1),2)>0,C2="N",D2="N",E2="N")textNO
 
The dates are usually the last 3 days from today's day. So todays date is March 11, 2022. So, I would be looking at March 8, 9, 10, 11.
The maximum amount in column A would never be more than $10,000.
There is two files, so the date column with time would be in different columns.
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
The dates are usually the last 3 days from today's day. So todays date is March 11, 2022. So, I would be looking at March 8, 9, 10, 11.
The maximum amount in column A would never be more than $10,000.
There is two files, so the date column with time would be in different columns.

Ok, we could check for the $ values for Not over something like 40000 ( which is a date value of 7/6/2009 )

But I think the better approach would be to check for the Date column.
In your 2 files, what are the Date Columns ?
 
Upvote 0
So the two files for example, the A2 is the values and J2 for the values in the other file.
The date column would be in column C as per the example above and in column E for the other column in the other file.
 
Upvote 0
Thanks for the info.

Change the A8 cell reference of CF formula for File 2 to the Starting cell of your File 2:

Book3.xlsx
ABCDEFGHIJ
1File 1
2156.231/11/22 20:31NYN
3180.185/11/22 12:31NyN
4192.5612/11/22 12:31YYN
5
6
7File 2
8NYN1/11/2022156.23
9NyN5/11/2022180.18
10YYN12/11/2022192.56
Sheet1042
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A8:J10Expression=OR(A8="N",IF(AND(N(A8),COLUMN(A8)<>5),MOD(A8,1),0))textNO
A2:F4Expression=OR(A2="N",IF(AND(N(A2),COLUMN(A2)<>3),MOD(A2,1),0))textNO
 
Upvote 0
Solution
jtakw, that is a brilliant solution using the mod and column COLUMN(A8)<>5) for example to exclude columns. (y)
I used the formula and I was able to exclude two columns that have dates and times in columns.
I think this is correct?
Book1
ABCDEF
1File 1
2156.231/11/20221/11/2022NYN
3180.185/11/20225/11/2022NyN
4192.5612/11/202212/11/2022YYN
Sheet5
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:F4Expression=OR(A2="N",IF(AND(N(A2),COLUMN(A2)<>3,COLUMN(A2)<>2),MOD(A2,1),0))textNO
 
Upvote 0
That looks correct to me, if your have Dates in Both Columns B and C.
 
Upvote 0
Thank you so much for your help. ?
This will save me so much time:)
 
Upvote 0
You're welcome, thanks for the feedback, glad it works for you.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

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