Conditional Formatting using Address(Row(),COL,4)

RMac0001

New Member
Joined
Jan 18, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi there,
I am trying to do conditional formatting based on a value using ADDRESS(ROW(),COL(),4)
For the below example I want to conditionally format C5 to C16, D5 to D16 and so on if they are greater or equal to the values in C23 to C34, D23 to D34 and so on.

I am using A2 as variable 1 and the Values in column B as variable 2 as I have multiple target tables. So A2 could be Chat, Talk, Web.

The formula I am using in conditional formatting is =INDEX(C23:C100,MATCH(A2 & " " & INDIRECT(ADDRESS(ROW(),2,4)),$A$23:$A$100,0))>=INDIRECT("C"&ROW())

1674096819450.png
 

Attachments

  • 1674095840098.png
    1674095840098.png
    42.3 KB · Views: 4

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Welcome to the MrExcel board!

For the furure: 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.

See if you can adapt this smaller example (assuming that I have understood correctly)
If it doesn't work, please advise if those "-" values in the top section are zeros formatted as "-" or simply text values.

23 01 19.xlsm
ABCD
1
2Chat
3
4
518.914.3
60.8553.7
754.51.1
8
9
10
11
12
13
14
15
16
17
22
23Chat November0.864.25
24Chat December0.863.76
25Chat January3.442.45
26
27
36
37Talk November2010
38Talk December0.260
39Talk January150.5
CF
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C5:F16Expression=AND(C5<>0,C5>=INDEX(C$23:C$100,MATCH($A$2&"*",$A$23:$A$100,0)+ROWS(C$5:C5)-1))textNO


If I change A2 to Talk:

23 01 19.xlsm
ABCD
1
2Talk
3
4
518.914.3
60.8553.7
754.51.1
8
9
10
11
12
13
14
15
16
17
22
23Chat November0.864.25
24Chat December0.863.76
25Chat January3.442.45
26
27
36
37Talk November2010
38Talk December0.260
39Talk January150.5
CF
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C5:F16Expression=AND(C5<>0,C5>=INDEX(C$23:C$100,MATCH($A$2&"*",$A$23:$A$100,0)+ROWS(C$5:C5)-1))textNO
 
Upvote 0
Welcome to the MrExcel board!

For the furure: 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.

See if you can adapt this smaller example (assuming that I have understood correctly)
If it doesn't work, please advise if those "-" values in the top section are zeros formatted as "-" or simply text values.

23 01 19.xlsm
ABCD
1
2Chat
3
4
518.914.3
60.8553.7
754.51.1
8
9
10
11
12
13
14
15
16
17
22
23Chat November0.864.25
24Chat December0.863.76
25Chat January3.442.45
26
27
36
37Talk November2010
38Talk December0.260
39Talk January150.5
CF
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C5:F16Expression=AND(C5<>0,C5>=INDEX(C$23:C$100,MATCH($A$2&"*",$A$23:$A$100,0)+ROWS(C$5:C5)-1))textNO


If I change A2 to Talk:

23 01 19.xlsm
ABCD
1
2Talk
3
4
518.914.3
60.8553.7
754.51.1
8
9
10
11
12
13
14
15
16
17
22
23Chat November0.864.25
24Chat December0.863.76
25Chat January3.442.45
26
27
36
37Talk November2010
38Talk December0.260
39Talk January150.5
CF
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C5:F16Expression=AND(C5<>0,C5>=INDEX(C$23:C$100,MATCH($A$2&"*",$A$23:$A$100,0)+ROWS(C$5:C5)-1))textNO
That works amazing. Thank you so much for you help. Also, I will make sure to use XL2BB in the future.
Thank you again
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,214,818
Messages
6,121,725
Members
449,049
Latest member
MiguekHeka

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