conditional format to highlight only those row ranges that agree with 2 conditions

palaeontology

Active Member
Joined
May 12, 2017
Messages
444
Office Version
  1. 2016
Platform
  1. Windows
In the range I4:M92 I have dynamic results from various formulae, so sometimes cells will have entries, and sometimes not.

For the range I4:M92 I'd like to only highlight those row ranges that agree with 2 conditions ....

1. the row is even
2. the character length in the cell in column I is greater than zero

The image (below) shows three images from left to right ...

Left Image : shows that my attempted conditional format formula .... =AND(ISEVEN(ROW(I4:M92)),LEN($I4)>0) ... is not working as it highlights nothing, though I know the 'iseven' part of the formula is correct as it works when I only conditionally format that on its own to highlight every even row

Middle Image : shows what happens when I use the formula .... =MOD(ROW(),2)=0 ... to highlight every 2nd row ... however, it's highlighting some rows I don't ultimately want highlighted as they don't contain a result

Right image : shows what I'm ultimately wanting the conditional format to highlight .... only those rows within the range I4:M92 that meet both conditions [note: for the purpose of showing the result i need I had to use the 'mod' formula for the range I4:M44]

highlight every 2nd row with conditions.JPG


can anyone see why my conditional format formula .... =AND(ISEVEN(ROW(I4:M92)),LEN($I4)>0) ... is not working they way I need it to ?

Very kind regards,

Chris
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
try
select I4:M92
=AND(ISEVEN(ROW($I4)),LEN($I4)>0)

i'll see about mocking something up and reply later

Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone

----
 
Upvote 1
=AND(ISEVEN(ROW($I4)),LEN($I4)>0)

for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
I4:M92 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=AND(ISEVEN(ROW($I4)),LEN($I4)>0)

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK



Book3
IJKLM
1
2
3
4
5
6
71
8
91
101
11
12
13
14
151
161
17
18
19
20
21
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I4:M26Expression=AND(ISEVEN(ROW($I4)),LEN($I4)>0)textYES
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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