Code covered by the BSD License  

Highlights from
Set conditional formating to Excel

5.0

5.0 | 1 rating Rate this file 7 Downloads (last 30 days) File Size: 1.45 KB File ID: #23107

Set conditional formating to Excel

by Tal Shir

 

25 Feb 2009 (Updated 26 Feb 2009)

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

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
04 Jun 2009 Aviator

Great capability. Can you tell me what needs to be changed in this code if I want to set a condition that: when/if any content of for instance 'C1:C10' is less (or) greater than 'B1:B10' turn that cell in the range 'C1:C10', Red???

Thanks,

Please login to add a comment or rating.
Updates
26 Feb 2009

No Products Required

Tag Activity for this File
Tag Applied By Date/Time
excel Tal Shir 25 Feb 2009 14:12:16
format Tal Shir 25 Feb 2009 14:12:16
conditional format Tal Shir 25 Feb 2009 14:12:16
color Tal Shir 25 Feb 2009 14:12:16

Contact us at files@mathworks.com