Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Conditional formatting based on different sheets. Autofill problem

I have this file as a test: Sample File

It contains 2 sheets (1 & 2)

and two tables (A1:D5) in each sheet

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

What I want to do is:

To color any not empty cell from sheet1 (filled with either text or value), ONLY IF its equivalent in sheet2 is empty.

what I want to do is clear and working fine in cell A1 in sheet1

– If it’s filled, and A1 in sheet2 is empty, it will be colored

– If it’s filled, and A1 in sheet2 is filled too, it won’t be colored

– If it’s empty, it won’t be colored no matter what happens in A1 in sheet2

The formula I used in the conditional formatting is:

=IF(A1<>"",ISBLANK(INDIRECT("’Sheet2′!A1")),"")

I think you understand that I’ve used INDIRECT because conditional formatting doesn’t work across the sheets DIRECTLY.

But, in my opinion, I think the problem that this only works for cell A1 is because the reference for the cells in the formula putted in a little quotation marks. That is what prevents it from autofill to expand to affect all cells in the table.

Do you have any ideas??

>Solution :

use:

=LEN(A1)*ISBLANK(INDIRECT(ADDRESS(ROW(A1),COLUMN(A1),,,"Sheet2")))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading