<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cell level formatting with Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Cell-level-formatting-with-Macro/m-p/475940#M177749</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need help in Macros. Let me explain the scenario I am working on.&lt;/P&gt;&lt;P&gt;I have three charts for different regions. The requirement is to identify the clients repeated in these 3 charts and setting the background color for those rows with Green color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to achieve this with Macro. But I am failing to set the background color Cell level.&lt;/P&gt;&lt;P&gt;Let me know how we can set background color at cell level.&lt;/P&gt;&lt;P&gt;Below is the code , which I just started doesn't cover the whole requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub ColorCode&lt;/P&gt;&lt;P&gt;set table = ActiveDocument.GetSheetObject( "CH104" )&lt;/P&gt;&lt;P&gt;set prop = table.GetProperties&lt;/P&gt;&lt;P&gt;for RowIter = 0 to table.GetRowCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set cell = table.GetCell(RowIter,0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if trim(cell.Text) &amp;lt;&amp;gt; "Total"&amp;nbsp; then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***** Need to Set the Color here for the "Cell"***********&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; prop.TableProperties.StyleNumber = -1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; table.SetProperties prop&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Nov 2013 21:56:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-11-21T21:56:11Z</dc:date>
    <item>
      <title>Cell level formatting with Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Cell-level-formatting-with-Macro/m-p/475940#M177749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need help in Macros. Let me explain the scenario I am working on.&lt;/P&gt;&lt;P&gt;I have three charts for different regions. The requirement is to identify the clients repeated in these 3 charts and setting the background color for those rows with Green color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to achieve this with Macro. But I am failing to set the background color Cell level.&lt;/P&gt;&lt;P&gt;Let me know how we can set background color at cell level.&lt;/P&gt;&lt;P&gt;Below is the code , which I just started doesn't cover the whole requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub ColorCode&lt;/P&gt;&lt;P&gt;set table = ActiveDocument.GetSheetObject( "CH104" )&lt;/P&gt;&lt;P&gt;set prop = table.GetProperties&lt;/P&gt;&lt;P&gt;for RowIter = 0 to table.GetRowCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set cell = table.GetCell(RowIter,0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if trim(cell.Text) &amp;lt;&amp;gt; "Total"&amp;nbsp; then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***** Need to Set the Color here for the "Cell"***********&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; prop.TableProperties.StyleNumber = -1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; table.SetProperties prop&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 21:56:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cell-level-formatting-with-Macro/m-p/475940#M177749</guid>
      <dc:creator />
      <dc:date>2013-11-21T21:56:11Z</dc:date>
    </item>
  </channel>
</rss>

