Using AND in a formula to apply conditional formatting when a cell value falls in between 2 other values

Snoogie2563

New Member
Joined
Jul 14, 2023
Messages
2
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
I actually have a few questions, but I thought I would "dip my toe in the water as it where with this one.

I think my subject states what I'm after pretty clearly, but I would actually ultimately like to apply the formatting to a group of 5 adjacent cells in a row. I can get this to work fine if it's just one criteria like "$J(x)>90" or "$J(x)<=0". Where I'm running into problems is when I try and do something like this, "=$G2=AND(J2<=90,J2>30) which is supposed to apply my formatting when the value of J2 is between 30 and 90." If I try =AND(J2<=90,J2>30) it will format the first cell in the group I'm trying to do but not the whole group
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi and Welcome to the MrExcel forum. Please accept my warmest greetings and sincere hope that all is well.

Try:
Dante Amor
AIJKLMNOPQ
1
222
329
436
543
650
757
864
971
1078
1185
1292
1399
Hoja3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
J2:P16Expression=($J2>=30)*($J2<=90)textNO

I don't know if you should include the value 30, if not then:
Excel Formula:
=($J2>30)*($J2<=90)

--------------
Let me know the result and I'll get back to you as soon as I can.
Cordially
Dante Amor
--------------​
 
Upvote 0
Solution
Hi & welcome to MrExcel.
With your formula you need to lock the columns like
Excel Formula:
=AND($J2<=90,$J2>30)
 
Upvote 0
Thanks to DanteAmor AND Fluff since you both said essentially the same thing. Locking the columns as suggested was the solution! Many thanks! The board wouldn't let me credit both as solutions.
 
Upvote 0
Everyone happy to help you, thanks for the feedback.
😇
 
Upvote 0

Forum statistics

Threads
1,215,372
Messages
6,124,541
Members
449,169
Latest member
mm424

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