Set conditional formating to Excel

Set a conditional format in Excel to change negative numbers text color to red.

You are now following this Submission

Set a conditional format in Excel to change negative numbers' text color to red.
The code can be modifeid quite easly to set any other condition.
Example:
a=randn(100,1)
xlswrite('a',a)
xlsCondFormNeg('a','Sheet1','A1:A50')

This Example will set the conditional formating to the first 50 numbers in the column.

Cite As

Tal Shir (2026). Set conditional formating to Excel (https://se.mathworks.com/matlabcentral/fileexchange/23107-set-conditional-formating-to-excel), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0.0

No Products Required

1.0.0.0