How to use conditional formatting to color the row in red based on cell value in other sheet

Ramadan2512

Board Regular
Joined
Sep 7, 2024
Messages
68
Office Version
  1. 2021
Platform
  1. Windows
I have two worksheets, sheet1 is a table to list tasks with the unit number named "task" and sheet2 is a table to list the task handling progress named "progress" . and i need to color the task row in sheet1 in red if the same task is mentioned in sheet2 and date is mentioned as done in sheet2 as you can see in screenshot

for example in the screenshot (if C2 in "sheet1"= any cell of "C" in "sheet2" and "H2" IS NOTBLANK) then color entire row in "sheet1" in red

So what is the formula that i can use in conditional formatting to do that
 

Attachments

  • Untitled.png
    Untitled.png
    24.4 KB · Views: 8
both workbooks are on my pc desktop
will they BOTH be open ??
only some functions will work with a closed workbook

looking at your link and files - its a lot different to the example - so not sure what sheet reference now or column references you want to use
need an explanation
the file - name progress - has a sheet called data - I'm assuming thats the sheet you want conditional formatting applied to
Column D is the Unit ID
then you have file AUTHS
No idea what yu are trying to match up on that workbook ?????

very confused now, as things have changed a lot frm our original question and example - and so i MAY NOT be able to answer now


countif() and countifs() will not work with closed workbooks according to this

so may need to have some lookup -
But as i say all you are doing is checking that the UNIT Number exists in the other sheet - you done seem to care about any particular status - is that correct
Then maybe a LOOKUP function that does work on closed books - with an IFERROR() or ISNUMBER()
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
will they BOTH be open ??
only some functions will work with a closed workbook

looking at your link and files - its a lot different to the example - so not sure what sheet reference now or column references you want to use
need an explanation
the file - name progress - has a sheet called data - I'm assuming thats the sheet you want conditional formatting applied to
Column D is the Unit ID
then you have file AUTHS
No idea what yu are trying to match up on that workbook ?????

very confused now, as things have changed a lot frm our original question and example - and so i MAY NOT be able to answer now


countif() and countifs() will not work with closed workbooks according to this

so may need to have some lookup -
But as i say all you are doing is checking that the UNIT Number exists in the other sheet - you done seem to care about any particular status - is that correct
Then maybe a LOOKUP function that does work on closed books - with an IFERROR() or ISNUMBER()
will they BOTH be open ??

not always both are open at the same time and yes you are right my posted screenshot was just created simple example
in my real sheet "AUTHS" and "Progress" let's say that what I need to change it's row color is this sheet "AUTHS"
So, in "AUTHS" workbook first sheet "District 1" let's say as folows: (IF(C2 =any cell of "Progress workbook" in column "D" and "H" in progress sheet is <>"" then to color the row in AUTHS with selected color
 
Upvote 0
this may work
=IFERROR(INDEX([Progress.xlsm]Data'!$H:$H,MATCH(C9,[Progress.xlsm]Data'!$D:$D,0))<>"",FALSE)

if it matches with the value in progress D with C
MATCH(C9,[Progress.xlsm]Data'!$D:$D,0))
then it will return the value in column H
and test to see if thats NOT blank - Ie a Date
(INDEX([Progress.xlsm]Data'!$H:$H,MATCH(C9,[Progress.xlsm]Data'!$D:$D,0))<>""
and then IF it can not find a match in column D for C - it will retunr an error
and the IFERROR will then return a MATCH

I have put the formula in COLUMN A of AUTHS on the dropbox share

you cannot use conditional formatting into other workbooks

so column A is effectively a helper column - can put in any column
and then use that column for conditional formatting the entire ROW

does that work, as i feel there is a lot more to this then just as described

dropbox link file will only be available for a few days
 
Upvote 0
Solution
this may work
=IFERROR(INDEX([Progress.xlsm]Data'!$H:$H,MATCH(C9,[Progress.xlsm]Data'!$D:$D,0))<>"",FALSE)

if it matches with the value in progress D with C
MATCH(C9,[Progress.xlsm]Data'!$D:$D,0))
then it will return the value in column H
and test to see if thats NOT blank - Ie a Date
(INDEX([Progress.xlsm]Data'!$H:$H,MATCH(C9,[Progress.xlsm]Data'!$D:$D,0))<>""
and then IF it can not find a match in column D for C - it will retunr an error
and the IFERROR will then return a MATCH

I have put the formula in COLUMN A of AUTHS on the dropbox share

you cannot use conditional formatting into other workbooks

so column A is effectively a helper column - can put in any column
and then use that column for conditional formatting the entire ROW

does that work, as i feel there is a lot more to this then just as described

dropbox link file will only be available for a few days
I really want to thank you so much for your help and being pateint to help me - thanks a million
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,176
Members
452,893
Latest member
denay

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