XL.ConditionalFormat.Font
-------------------------

Returns the font for this format.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [XL](component_XL.md) | [14.2](newinversion142.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "XL.ConditionalFormat.Font"; BookRef; ConditionalFormatRef ) 

**MBS**( **"XL.ConditionalFormat.Font";** /\* Returns the font for this format. \*/  
**$BookRef**; /\* The reference number for the workbook.e.g. $ref \*/   
**$ConditionalFormatRef**) /\* The reference number for the conditional format.e.g. $ConditionalFormat \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |
| ConditionalFormatRef | The reference number for the conditional format. | $ConditionalFormat |

### Result

Returns text or error.

### Description

Returns the font for this format.  
If no font is defined, the result is empty.  
### Examples

Highlighting cells that begin With the given text:

 # add conditional format   
Set Variable \[ $cFormat ; Value: MBS ("[XL.Book.AddConditionalFormat](XLBookAddConditionalFormat.md)"; $book ) \]  
\#   
\# set font to be folder   
Set Variable \[ $font ; Value: MBS ("XL.ConditionalFormat.Font"; $book ; $cFormat ) \]  
Set Variable \[ $r ; Value: MBS ("[XL.Font.SetBold](XLFontSetBold.md)"; $book ; $font ; 1) \]  
\#   
Set Variable \[ $[CF](CF.md) ; Value: MBS ("[XL.Sheet.AddConditionalFormatting](XLSheetAddConditionalFormatting.md)"; $book ; $sheet ) \]  
Set Variable \[ $r ; Value: MBS ("[XL.ConditionalFormating.AddRange](XLConditionalFormatingAddRange.md)"; $book ; $[CF](CF.md); 2; 10; 1; 1) \]  
Set Variable \[ $r ; Value: MBS ("[XL.ConditionalFormating.AddRule](XLConditionalFormatingAddRule.md)"; $book ; $[CF](CF.md); 0 /\* BeginWith \*/; $cFormat ; "a") \]  
### See also

- [XL.Book.AddConditionalFormat](XLBookAddConditionalFormat.md)
- [XL.ConditionalFormating.AddRange](XLConditionalFormatingAddRange.md)
- [XL.ConditionalFormating.AddRule](XLConditionalFormatingAddRule.md)
- [XL.Font.SetBold](XLFontSetBold.md)
- [XL.Sheet.AddConditionalFormatting](XLSheetAddConditionalFormatting.md)

### Release notes

- **Version 15.5**
    - Fixed [XL.ConditionalFormat.Font](https://www.mbsplugins.eu/XLConditionalFormatFont.shtml) to return correct font index.

### Example Databases

- [XL/Conditional Formatting](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/XL/Conditional%20Formatting.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 15.5pr6](https://www.mbsplugins.de/archive/2025-11-09/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Conditional Formatting in Excel exports from FileMaker](https://www.mbsplugins.de/archive/2024-04-08/Conditional_Formatting_in_Exce/monkeybreadsoftware_blog_filemaker)

Created 30th March 2024 , last changed 31st March 2024

  
[XL.Color.UnPack](XLColorUnPack.md) - [XL.ConditionalFormat.GetBorderBottom](XLConditionalFormatGetBorderBottom.md)

[HTML Version](XLConditionalFormatFont.shtml)