VBA support true and false color

sksanjeev786

Well-known Member
Joined
Aug 5, 2020
Messages
883
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Team

I need help checking the color of cells from F to J and O to S column inlduing Bold data as welll

FS.xlsm
EFGHIJKLMNOPQRSTUVWXYZ
6Brand Consideration37%+15.946%+15.537%15.946%15.5TRUETRUETRUETRUETRUE
7TRUETRUETRUETRUETRUE
8Brand Favorability34%+16.742%+15.434%16.742%15.4TRUETRUETRUETRUETRUE
9Brand Revelance40%+24.548%+19.040%24.548%19TRUETRUETRUETRUETRUE
10TRUETRUETRUETRUETRUE
11Aided Brand Awareness91%+5.289%+3.691%5.289%3.6TRUETRUETRUETRUETRUE
12Brand Association31%+16.041%+10.531%1641%10.5TRUETRUETRUETRUETRUE
13Ad Recall7%+12.515%+14.87%12.515%14.8TRUETRUETRUETRUETRUE
14Brand Value37%+21.548%+10.937%21.548%10.9TRUETRUETRUETRUETRUE
1563/352105/46763/352105/467TRUETRUETRUETRUETRUE
Sheet1
Cell Formulas
RangeFormula
F6,I11:I14,F11:F14,I8:I9,F8:F9,I6F6=INDEX(INDIRECT("'"&$A6&$B6&"'!A"&$C6&":IV"&$D6&""),MATCH($E6,INDIRECT("'"&$A6&$B6&"'!A"&$C6&":A"&$D6&""),0),F$2)
G6,J11:J14,G11:G14,J8:J9,G8:G9,J6G6=INDEX(INDIRECT("'"&$A6&$B6&"'!A"&$C6&":IV"&$D6&""),MATCH($E6,INDIRECT("'"&$A6&$B6&"'!A"&$C6&":A"&$D6&""),0),G$2)*100
V6:V14,X6:Y14V6=ROUND(F6,2)=O6
W6:W15,Z6:Z15W6=ROUND(G6,1)=P6
V15,X15:Y15V15=F15=O15
F15,I15F15=F17&"/"&G17
Cells with Conditional Formatting
CellConditionCell FormatStop If True
V6:Z15Cell Valuecontains "f"textNO
G6,J6Expression=G24=$AB$1textNO
G6,J6Expression=G24=$AB$2textNO
G6,J6Expression=G24=$AB$3textNO
E6:E14Cell ValueduplicatestextNO
G11:G14,J11:J14Expression=G27=$AB$1textNO
G11:G14,J11:J14Expression=G27=$AB$2textNO
G11:G14,J11:J14Expression=G27=$AB$3textNO
H6:H14Expression=I6="p"textNO
H6:H14Expression=I6="q"textNO
H6:H14Expression=I6="r"textNO
G8:G9,J8:J9Expression=G25=$AB$1textNO
G8:G9,J8:J9Expression=G25=$AB$2textNO
G8:G9,J8:J9Expression=G25=$AB$3textNO
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
You can get current cell colour with
Sheets("Sheet10").range("D12").displayformat.interior.color

You can test for bold: Sheets("Sheet10").range("D12").displayformat.font.bold and get True or False.
I don't know if you can actually return font properties as values.
 
Upvote 0
UPDATE
the syntax needed to return bold/italic etc. seems to be
Sheets("Sheets10").Range("D12").DisplayFormat.Font.FontStyle
 
Last edited:
Upvote 0
UPDATE
the syntax needed to return bold/italic etc. seems to be
Sheets("Sheets10").Range("D12").DisplayFormat.Font.FontStyle
HI Micron,

Thank you so much for your time

could you please provide the macro as i am not able to use above sysnact under Module :)

Regards
Sanjeev
 
Upvote 0
I have no macro for your situation. All I have is what I used to discover what the syntax is for the properties:
VBA Code:
Sub testFontProperties()

MsgBox Sheets("10").Range("D12").DisplayFormat.Font.FontStyle
MsgBox Sheets("10").Range("D12").DisplayFormat.Interior.Color

End Sub
You can attempt to create a procedure and post it as the solution or as further details to help with the problem? You'll need to loop over the ranges and test the format conditions that are present at the time the code runs, using that syntax.
 
Upvote 0
I have no macro for your situation. All I have is what I used to discover what the syntax is for the properties:
VBA Code:
Sub testFontProperties()

MsgBox Sheets("10").Range("D12").DisplayFormat.Font.FontStyle
MsgBox Sheets("10").Range("D12").DisplayFormat.Interior.Color

End Sub
You can attempt to create a procedure and post it as the solution or as further details to help with the problem? You'll need to loop over the ranges and test the format conditions that are present at the time the code runs, using that syntax.

Thanks for the update Micron:)
 
Upvote 0

Forum statistics

Threads
1,214,968
Messages
6,122,509
Members
449,089
Latest member
RandomExceller01

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