change cell color in excel conditional formatting

조회 수: 11 (최근 30일)
Murugan C
Murugan C 2019년 11월 13일
Hello all,
I am working on excel file. In that, I want to do conditional formatting for specfic text using ActiveX command. i.e. if any cell contains 'Input_' need to change cell colour and if any cell contais 'Output_' need to change cell colour and so on.
If apply for number it is working fine.But it is not working for specfic text. Please find blow code. which I commented for number.
Excel.Selection.FormatConditions.Delete;
condition_format = ['Type:=xlTextString, String:="Input_", TextOperator:=xlBeginsWith'];
% condition_format =['=' range '<6']; %for number
Excel.Selection.FormatConditions.Add(2, [], condition_format)
Can anyone help me out, how to do for specfic text?
Thanks in advance.
Murugan

답변 (0개)

카테고리

Help CenterFile Exchange에서 ActiveX에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by