Conditional Formatting to highlight the previous cell if the statement is true

ExcelNewbie2020

Active Member
Joined
Dec 3, 2020
Messages
350
Office Version
  1. 365
Platform
  1. Windows
Sirs/Ma'ams,

My formula is working good with conditional formatting if the statement is true. It highlight the cell as normal.

Now, i would like to highlight the previous cells (instead of current) if the statement is true. See below

1658321642289.png


This is the formula that I use..
=IF(COUNTIFS(Sheet1!$B$9:$B$500,$B6,Sheet1!$K$9:$K$500,G$5,Sheet1!$L$9:$L$500,"Active"),TRUE,"")

I hope I explain it well..

Many Thanks,
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Is that formula in the cell or in conditional formatting?
 
Upvote 0
In that case you can use it to highlight whichever column you want. Just apply it to any columns that should be coloured.
Also you don't need the IF you can just use
Excel Formula:
=COUNTIFS(Sheet1!$B$9:$B$500,$B6,Sheet1!$K$9:$K$500,G$5,Sheet1!$L$9:$L$500,"Active")
 
Upvote 0
In that case you can use it to highlight whichever column you want. Just apply it to any columns that should be coloured.
Also you don't need the IF you can just use
Excel Formula:
=COUNTIFS(Sheet1!$B$9:$B$500,$B6,Sheet1!$K$9:$K$500,G$5,Sheet1!$L$9:$L$500,"Active")
thank you.. I have a wide range of column.. from W1 to W100.. I did highlight it all, but its highlighting the current cell not the previous cell..
 
Upvote 0
Excel does not have columns W1 to W100.
If it is not working, then you will need to post some data & not an image that shows nothing of any value.
 
Upvote 0
Excel does not have columns W1 to W100.
If it is not working, then you will need to post some data & not an image that shows nothing of any value.
sorry, W1 to W100 is my column header.. It is working, but my question is how do I select the cells to highlight if I need to highlight the whole range?.. For Example

1658324539200.png



I selected the above cells (K1:V11) then apply the condi formatting. W6 (P) highlighted when it triggered the formula. but I need to highlight W5 (O) instead.
 
Upvote 0
Without seeing your data I cannot help, so can you please post it.
 
Upvote 0
Without seeing your data I cannot help, so can you please post it.
I hope this will help...

sample.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAA
11NAME1W2ActiveW1W2W3W4W5W6W7W8W9W10W11W12W13W14W15W16W17W18W19W20
22NAME2W2ActiveNAME1
33NAME3W2ActiveNAME2
44NAME4W2ActiveNAME3
55NAME5W2ActiveNAME4
66NAME6W2ActiveNAME5
77NAME7W3ActiveNAME6
88NAME8W3ActiveNAME7
99NAME9W3ActiveNAME8
1010NAME10W3ActiveNAME9
1111NAME11W3ActiveNAME10
12
13
14Instead of W2, I need to highlight W1
15Same in W3, it should be W2
16
17Conditional Formatting Formula =COUNTIFS($B$1:$B$11,$F2,$C$1:$C$11,G$1,$D$1:$D$11,"Active")
18
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G2:Z11Expression=COUNTIFS($B$1:$B$11,$F2,$C$1:$C$11,G$1,$D$1:$D$11,"Active")textNO
D1:D11Cell Value="Hold"textNO
D1:D11Cell Value="In-process"textNO
D1:D11Cell Value="Done"textNO
 
Upvote 0
Ok, thanks for that, change the formula to
Rich (BB code):
=COUNTIFS($B$1:$B$11,$F2,$C$1:$C$11,H$1,$D$1:$D$11,"Active")
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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