Need to check color true and false

sksanjeev786

Well-known Member
Joined
Aug 5, 2020
Messages
961
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Team
I have data L6 to M17 (pulled from Excel) and Q6 to R17 (pulled from a PPT file) and i want to cross-check the color by true and false
if the color not match i need false in (W6 to X17)

FS.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXY
1Datan7Site All Hits: Hulu0434p
2Weight Details244550r
3Weighting SchemeMid Campaign SLW 6/1/22-9/30/22893q
4slide 18ControlDeltaExcelPPT
5
6Data155Unaided Brand Awareness - First Mention1%+0.210.2TRUETRUE
7Site All Hits: HuluData155Unaided Brand Awareness - Any Mention19%+0.2190.2TRUETRUE
8Brand MetricsControlExposedDeltaData155Unaided Brand Awareness - Other Mentions18%+0.1180.1TRUETRUE
9Unaided Brand Awareness - First Mention1.3%1.5%0.2%Data155Aided Awareness96%-0.996-0.9TRUETRUE
10Unaided Brand Awareness - Any Mention18.8%19.0%0.2%Data155Total Ad Awareness33%+13.43313.4TRUETRUE
11Unaided Brand Awareness - Other Mentions17.5%17.6%0.1%Data155Online Ad Awareness20%+8.1208.1TRUETRUE
12Aided Awareness96.2%95.4%-0.9%Data155CTV Ad Awareness 8%+3.483.4TRUETRUE
13Total Ad Awareness32.6%46.0%13.4%Data155Message Association - "We Got Now"9%+1.191.1TRUETRUE
14Online Ad Awareness20.0%28.1%8.1%Data155Brand Favorability57%+1.4571.4TRUETRUE
15CTV Ad Awareness 8.3%11.7%3.4%Data155Consideration Intent49%+6.2496.2TRUETRUE
16TV Ad Awareness8.5%11.7%3.2%Data155Recommendation - T3B33%+8.4338.4TRUETRUE
17Social Ad Awareness16.8%27.3%10.5%Data155Recommendation - B3B11%+2.1112.1TRUETRUE
18Message Association - "We Got Now"8.9%10.0%1.1%324/648
19Brand Favorability56.7%58.0%1.4%
20Consideration Intent48.9%55.1%6.2%[Mediahub New Balance_Banner Books Data for DD Charting.xlsx]Banner Book 141100n324648324/648TRUETRUE
21Recommendation - T3B32.7%41.0%8.4%324/648
22Recommendation - B3B11.0%13.1%2.1%
23Net Promoter: Promoter20.9%28.7%7.8%
24Net Promoter Score-34.3%-19.0%15.3%
25Net Promoter: Passive23.9%23.6%-0.3%
26Net Promoter: Detractors55.2%47.7%-7.5%
27n324648648
28
29
30BD
3124
32
33Unaided Brand Awareness - First Mention929
34Unaided Brand Awareness - Any Mention10215
35Unaided Brand Awareness - Other Mentions11215
36Aided Awareness1229
37Total Ad Awareness13243
38Online Ad Awareness14245
39CTV Ad Awareness 15245
40Message Association - "We Got Now"18215
41Brand Favorability19215
42Consideration Intent20243
43Recommendation - T3B21243
44Recommendation - B3B22215
45
Data
Cell Formulas
RangeFormula
H1H1=H3-1
L1:M1L1=INDEX(INDIRECT("'"&$G$6&$H$6&"'!A1:IV100"),$H$1,L$2)
W1:X3W1=Getfillcolor(W1)
M2M2=L2+2
H3H3=MATCH("Control",INDIRECT("'"&$G$6&$H$6&"'!B:B"),0)
L4:M4L4=INDEX(INDIRECT("'"&$G$6&$H$6&"'!A1:IV100"),$H$3,L$2)
L6:L17,L20L6=INDEX(INDIRECT("'"&$G6&$H6&"'!A"&$I6&":IV"&$J6&""),MATCH($K6,INDIRECT("'"&$G6&$H6&"'!A"&$I6&":A"&$J6&""),0),L$2)
M6:M17M6=INDEX(INDIRECT("'"&$G6&$H6&"'!A"&$I6&":IV"&$J6&""),MATCH($K6,INDIRECT("'"&$G6&$H6&"'!A"&$I6&":A"&$J6&""),0),M$2)*100
W6:W17W6=ROUND(L6*100,0)=Q6
X6:X17X6=ROUND(M6,1)=R6
G20G20=VLOOKUP($G$4,Sheet3!$A$2:$C$25,2,0)
H20H20=VLOOKUP($G$4,Sheet3!$A$2:$C$25,3,0)
M20M20=INDEX(INDIRECT("'"&$G20&$H20&"'!A"&$I20&":IV"&$J20&""),MATCH($K20,INDIRECT("'"&$G20&$H20&"'!A"&$I20&":A"&$J20&""),0),M$2-1)
Q20Q20=Q18
W20:X20W20=L21=Q20
L21L21=L20&"/"&M20
L30:M30L30=CHAR(L31+64)
L31:M31L31=L2
J33:J44J33=K6
K33:K44K33=MATCH($K6,INDIRECT("'"&$G6&$H6&"'!A"&$I6&":A"&$J6&""),0)
L33:M44L33=Getfillcolor(INDIRECT("'"&$G6&$H6&"'!"&L$30&$K33&""))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
W6:Z20Cell Valuecontains "f"textNO
L4:N5,P4:P5,U4:Z5Cell Valuecontains "Delta"textNO
K33:K67Cell ValueduplicatestextNO
M6:M19Expression=M33=$W$1textNO
M6:M19Expression=M33=$W$2textNO
M6:M19Expression=M33=$W$3textNO
Cells with Data Validation
CellAllowCriteria
G4List=Sheet3!$D$2:$D$99
 
Hi there,

You can't obtain the fill color from CF cells with a UDF.
You can however, color the cells with the same color given by the CF with a Sub, that way, your UDF will work.

Select the range with the CF colors and run the macro.

Here is the code:
VBA Code:
Sub FillCellWithCFColor()
Dim myRange As Range
Set myRange = Selection

Dim cell As Range
For Each cell In myRange
    cell.Interior.Color = cell.DisplayFormat.Interior.Color
Next cell

End Sub

You can delete CF after that, the colors will remain, this time, not conditional.
Hi,

Thanks for your help on this
i have applied this in my database but as I have to pull the data from multiple sheets so CF color will varies
and with this, i can only check once only.

if this is not possible then i have to use the above macro :)
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Leo:

this actually *is* possible! See the method on Chip Pearson's webpage per the link in my previous post

One (maybe two) things will fix this for you:

1) Per the note at the top of Chip's page:

As such, instead of having the conditional formatting rule be "Use a formula to determine which cells to format", use "Format only cells that contain". You can still link the values to AA1, AA2, and AA3 respectively, but this will circumvent the issue Chip explained, as I think your use case hits on all three of those.

2) Note that, if your GetFillColor returns the interior.colorindex (and not the interior.color), you'd use ColorIndexofCF instead of ColorofCF

Hi Oaktree,

Thanks for your time and hard work on this.

With the above Macro, i can use cell one-time cell color with PPT file as mentioned above still can is it possible to get the interior color based on the CF

I hope you understand the scenario i am looking for :)
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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