OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                           
 

2.2.3.39 wcolor


Menu Information

Worksheet: Conditional Formatting: Highlight

Brief Information

Apply conditional formatting to worksheet cells using custom rules.

Command Line Usage

1. wcolor rng:=[Book1]Sheet1! name:="C1R1-C0R0" trrule.cond1:=4 trrule.val11:=30;

2. wcolor rng:=[Book1]Sheet1! name:="C1R1-C0R0" trrule.cond1:=1 trrule.val11:=10 trrule.join:=1 trrule.cond2:=3 trrule.val21:=5 trrule.fill:=18 trrule.font:=4;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Range rng

Input

Range

<active> Specify range of the cells in the worksheet to apply conditional formatting.
Name name

Input

string

Specify the name for the selected range.
Rule trrule

Input

TreeNode

<unassigned> Set the condition and color options. See more details in this page.

Description

Use this X-Function to color cells that the value matchs the condition setting

Examples

Example 1: To color the cells contains the specified text.

  1. Create a new workbook and import the file automobile2.dat in the <Origin Program Folder>\Samples\Statistics folder.
  2. Type the following script in the Script Window and press Enter key.
wcolor rng:=[automobile2]automobile2!3 name:="C3R1-C3R0" trrule.cond1:=7 trrule.text1:=Japan;

Then the cells with text Japan will be colored in the third column.

Related X-Functions

X-Function:wheatmap, X-Function:wcolordup


Keywords:cell coloring

 

© OriginLab Corporation. All rights reserved.