Highlight consecutive cells in a row and collunm from table

Jorge Correia

New Member
Joined
Jun 21, 2021
Messages
14
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I am trying to highlight the value "0" with conditional formating in consecutives cells (in the table) in the same row and in the same colunm like I done manualy in picture b3a.
The first value in the table is in cell B3.
I have this formula ="and(or((B3=D3,C3=b3),B3=0),or((E3=D3,F3=D3),b3=0)" but there something not working...
I know it's possible in a row but is it like I am trying?
Thank you.
 

Attachments

  • b3.PNG
    b3.PNG
    31.6 KB · Views: 25
  • b3a.PNG
    b3a.PNG
    33.6 KB · Views: 37

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Welcome to the Board!

You would also need to check the row above and the row below, i.e. for cell B3:
Excel Formula:
=AND(B3=0,OR(B2=0,B4=0,A3=0,C3=0))
 
Upvote 0
Welcome to the Board!

You would also need to check the row above and the row below, i.e. for cell B3:
Excel Formula:
=AND(B3=0,OR(B2=0,B4=0,A3=0,C3=0))
Thank you.
I have this error with your formula, I had it also with others.
My table has data from $A$1:$BL$500+
 

Attachments

  • error.PNG
    error.PNG
    66.6 KB · Views: 26
Upvote 0
It looks like you first data entry is in cell B2.
So, select the range B2:BL500, and go to Conditional Formatting, and enter this formula:
Excel Formula:
=AND(B2=0,B2<>"",OR(AND(A2=0,A2<>""),AND(C2=0,C2<>""),AND(B1=0,B1<>""),AND(B3=0,B3<>"")))
and choose your formatting option.

That seemed to work for me.
 
Upvote 0
It looks like you first data entry is in cell B2.
So, select the range B2:BL500, and go to Conditional Formatting, and enter this formula:
Excel Formula:
=AND(B2=0,B2<>"",OR(AND(A2=0,A2<>""),AND(C2=0,C2<>""),AND(B1=0,B1<>""),AND(B3=0,B3<>"")))
and choose your formatting option.

That seemed to work for me.
I always got this error.
I got Office Professional Plus 2016.
The formula can be right, I tried to modify to avoid the error but It pop up every time.
 

Attachments

  • excel error.png
    excel error.png
    3.8 KB · Views: 20
Upvote 0
Try changing all the commas to semi-colons.
 
Upvote 0
Try changing all the commas to semi-colons.
Thanks, the error is gone but the formula don't highlight anything.
I want to highlight only the consecutive cells in a row and in a collunm that have the value "0" (zero), like I did manually in the picture.
 

Attachments

  • b3a.PNG
    b3a.PNG
    33.6 KB · Views: 21
Upvote 0
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
I always got this error.
I got Office Professional Plus 2016.
The formula can be right, I tried to modify to avoid the error but It pop up every time.

Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
Cell Formulas
RangeFormula
AG19:AI19,S19:AE19,B19:Q19,N18:Z18,B18:L18,R17:U17,K17:P17,F17:I17,C17:D17,N16:P16,G16:L16,W15:AA17,R15:V16,M15:Q15,J15:K15,G15:H15,C15:E16,B4:B15,AB14:AJ18,P14:Z14,C14:N14,AC13:AJ13,R13:AA13,C13:P13,AD12:AJ12,Y12:AB12,L12:W12,C12:J12,AH11:AI11,Z11:AF11C4=C3+1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B3:AT228Cell Value=0textNO
B3:AT228Expression=AND(B2=0;B2<>"";OR(AND(A2=0;A2<>"");AND(C2=0;C2<>"");AND(B1=0;B1<>"");AND(B3=0;B3<>"")))textNO
 
Upvote 0
Thanks for that, how about
Cell Formulas
RangeFormula
C4:I4,AG19:AI19,S19:AE19,B19:Q19,N18:Z18,B18:L18,R17:U17,K17:P17,F17:I17,C17:D17,N16:P16,G16:L16,W15:AA17,R15:V16,M15:Q15,J15:K15,G15:H15,C15:E16,B4:B15,AB14:AJ18,P14:Z14,C14:N14,AC13:AJ13,R13:AA13,C13:P13,AD12:AJ12,Y12:AB12,L12:W12,C12:J12,AH11:AI11C4=C3+1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B3:AJ19Expression=AND(B3=0,B3<>"",OR(AND(A3=0,A3<>""),AND(C3=0,C3<>""),AND(B2=0,B2<>""),AND(B4=0,B4<>"")))textNO


Once again you will need to change the comma to semi-colon
 
Upvote 0
Solution

Forum statistics

Threads
1,223,884
Messages
6,175,171
Members
452,615
Latest member
bogeys2birdies

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