I have several columns B, C, D, E, F, that contain values and blank spaces Some of the…
- User
I have several columns B, C, D, E, F, that contain values and blank spaces Some of the cells in the columns are also highlighted with a background colour. Is there a way that I can caputre all the cells that contain values and that are not highligted into column H
- Assistant
Yes, you can achieve this by using a combination of the IF function and conditional formatting in Excel.
-
Select column H where you want to capture the cells that meet your criteria.
-
In the formula bar, enter the following formula in cell H1: =IF(AND(B1<>"", C1<>"", D1<>"", E1<>"", F1<>""), IF(AND(COUNTCELLS(B1,F1)=COUNTIFS(B1:F1, "<>"), COUNTBLANK(B1:F1)=0), B1, ""), "")
This formula checks if all cells from B1 to F1 contain a value (<> "") and are not blank. It also checks if no cell has a background color using the COUNTCELLS and COUNTIFS functions. If all the conditions are met, it returns the value of B1; otherwise, it returns an empty string ("").
-
Drag the formula down to apply it to all the cells in column H corresponding to your data in columns B, C, D, E, and F.
The result will be a list of cells that have values and are not highlighted in column H.
-