COUNTIF Conditional Formatting Reversal and leaving rows blank

b_pickett

New Member
Joined
Aug 22, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I am working on a spreadsheet, and I need to highlight blank cells prior to the text mark "AI." However, When I do this, it highlights the rest of the rows that are in that grouping where "AI" does not appear, and data has yet to be entered. I found this thread that got me part of the way there, but I need the rest of the rows to not highlight when there is no data entered.

I am currently using COUNTIF($F1:F1,"AI")=0

What modifications could I make to it in order to achieve this?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Welcome to the Board!

I am having a hard time visualizing your question. It probably would make a lot more sense if you could post some sample data and expected output, so we can see exactly what you are working with and why you want the end result to look like.

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
Welcome to the Board!

I am having a hard time visualizing your question. It probably would make a lot more sense if you could post some sample data and expected output, so we can see exactly what you are working with and why you want the end result to look like.

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.
I couldn't ger xl2BB to work, so I attached images The first one is what it currently looks like with the formula, the second is what i would like the formula to do
 

Attachments

  • Screenshot 2024-08-22 075137.png
    Screenshot 2024-08-22 075137.png
    16.4 KB · Views: 20
  • Screenshot 2024-08-22 075611.png
    Screenshot 2024-08-22 075611.png
    34.1 KB · Views: 15
Upvote 0
Is it possible to have "ai" in a row, and have a mixture of blanks and "x" in the columns before the "ai" in that row?
If so, then do you only want the blank cells formatted red?
 
Upvote 0
Is it possible to have "ai" in a row, and have a mixture of blanks and "x" in the columns before the "ai" in that row?
If so, then do you only want the blank cells formatted red?
Due to the nature of the spreadsheet, there will really only be blanks before it
 
Upvote 0
OK, so assuming that you are wanting to format rows 3:20, and want to go out as far as column AW, do the following:

1. Select the range A3:AW20
2. Go to Conditional Formatting
3. Select the "New Rule" option
4. Select the "Use a formula to determine which cells to format" option
5. Enter this formula:
Excel Formula:
=AND(A3="",COUNTIF(B3:$AW3,"ai")>0)
6. Choose your Red formatting option
It then should do what you want, i.e.

1724334055161.png
 
Upvote 1
Solution
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,224,815
Messages
6,181,136
Members
453,021
Latest member
Justyna P

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