<?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 Re: How to add superscripts to a cell according its value in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15789#M2808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tested it . No problem. &lt;/P&gt;&lt;P&gt;You should use numeric format not picture format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;proc format;
value rf(default=40)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; low-1="9.999"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;lt;-high="9.99 ~{super b}";
run;

data one;
input name :$40. age ratio;
name=ifc(age lt 20,catx(' ',name,'~{super a}'),name);
format ratio rf.;
cards;
Mathew&amp;nbsp; 14&amp;nbsp; 0.75
Mark 15 0.975
Luck&amp;nbsp; 37 12.59
John 48&amp;nbsp;&amp;nbsp; 2.75
Paul 45&amp;nbsp; 0.735
;
run;
ods rtf file="c:\x.rtf";
ods escapechar="~"; 
proc report data=one nowd ;
run;
ods rtf close; 

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Dec 2011 02:45:21 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2011-12-16T02:45:21Z</dc:date>
    <item>
      <title>How to add superscripts to a cell according its value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15784#M2803</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;I am trying to produce a table template for a report. One column of table need to add superscript to the cell according to the cell value ( for example, if the value &amp;gt;1 then a super a need to add to that value). it seems that cellstyle and translate don't work. Does anyone can help on this quesitons. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 16:48:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15784#M2803</guid>
      <dc:creator>dyan</dc:creator>
      <dc:date>2011-12-15T16:48:55Z</dc:date>
    </item>
    <item>
      <title>How to add superscripts to a cell according its value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15785#M2804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Possibly the following paper might help: &lt;A href="http://www.lexjansen.com/pharmasug/2007/po/po12.pdf"&gt;http://www.lexjansen.com/pharmasug/2007/po/po12.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It uses a compute block to assign superscripts based on cell values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 17:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15785#M2804</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-12-15T17:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to add superscripts to a cell according its value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15786#M2805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the paper is useful for fixed string, but how about on the dynamic value? ( it seems the proc format &lt;/P&gt;could do the trick, but I have not made it work on my data)&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 19:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15786#M2805</guid>
      <dc:creator>dyan</dc:creator>
      <dc:date>2011-12-15T19:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to add superscripts to a cell according its value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15787#M2806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post some example data (perferably in the form of a datastep) and the code you tried?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 19:35:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15787#M2806</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-12-15T19:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to add superscripts to a cell according its value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15788#M2807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; data one;&lt;/P&gt;&lt;P&gt;input name$ age ratio;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;Mathew&amp;nbsp; 14&amp;nbsp; 0.75&lt;/P&gt;&lt;P&gt;Mark 15 0.975&lt;/P&gt;&lt;P&gt;Luck&amp;nbsp; 37 12.59&lt;/P&gt;&lt;P&gt;John 48&amp;nbsp;&amp;nbsp; 2.75&lt;/P&gt;&lt;P&gt;Paul 45&amp;nbsp; 0.735&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like add superscript "a" on the name whose age is less than 20 and add superscipt "b" on the number in ratio column that greater than 1.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;&lt;SPAN style=": ; color: #0000ff; font-size: 2; font-family: 'Courier New';"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods rft file="c:\output\rtf"&lt;/P&gt;&lt;P&gt;ods escapechar="^"; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;proc format;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;picture ratioform &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;low-1.0="9.999"&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;1.0-high="9.99^{super b}";/* I did not make this work, it add super b, but the decimal point is wrong*/&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;run;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;proc template;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿define table mytable;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ﻿&lt;/SPAN&gt;column name age ratio;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ﻿/****need help on name super a*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;define column ratio;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ﻿header ="Ratio";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ﻿&lt;/SPAN&gt;format=ratioform.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ﻿&lt;/SPAN&gt;end;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;end;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;data _null_;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;set one;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;file print ods=(template="mytable");&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;put _ods_;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;run;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;ods rtf close;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 19:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15788#M2807</guid>
      <dc:creator>dyan</dc:creator>
      <dc:date>2011-12-15T19:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to add superscripts to a cell according its value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15789#M2808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tested it . No problem. &lt;/P&gt;&lt;P&gt;You should use numeric format not picture format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;proc format;
value rf(default=40)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; low-1="9.999"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;lt;-high="9.99 ~{super b}";
run;

data one;
input name :$40. age ratio;
name=ifc(age lt 20,catx(' ',name,'~{super a}'),name);
format ratio rf.;
cards;
Mathew&amp;nbsp; 14&amp;nbsp; 0.75
Mark 15 0.975
Luck&amp;nbsp; 37 12.59
John 48&amp;nbsp;&amp;nbsp; 2.75
Paul 45&amp;nbsp; 0.735
;
run;
ods rtf file="c:\x.rtf";
ods escapechar="~"; 
proc report data=one nowd ;
run;
ods rtf close; 

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2011 02:45:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15789#M2808</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-16T02:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to add superscripts to a cell according its value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15790#M2809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Ksharp. Your code is really helpful. The numeric format does not work for me because I want to add super b to 12.59&amp;nbsp; ( it should be 12.59 {super b} not 9.99{super b}. The picture format works fine this time. But the name {super a } works cool!!! and I learned a funcion IFC.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2011 14:22:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15790#M2809</guid>
      <dc:creator>dyan</dc:creator>
      <dc:date>2011-12-16T14:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to add superscripts to a cell according its value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15791#M2810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ou? Sorry. I don't notice this.&lt;/P&gt;&lt;P&gt;Just use picture format to replace numeric format. No problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;proc format;
picture rf(default=40)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; low-1="9.999"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;lt;-high="9.99 ~{super b}";
run;

data one;
input name :$40. age ratio;
if age lt 20 then name=catx(' ',name,'~{super a}');
format ratio rf.;
cards;
Mathew&amp;nbsp; 14&amp;nbsp; 0.75
Mark 15 0.975
Luck&amp;nbsp; 37 12.59
John 48&amp;nbsp;&amp;nbsp; 2.75
Paul 45&amp;nbsp; 0.735
;
run;
ods rtf file="c:\x.rtf";
ods escapechar="~"; 
proc report data=one nowd ;
run;
ods rtf close; 

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2011 15:41:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-superscripts-to-a-cell-according-its-value/m-p/15791#M2810</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-16T15:41:59Z</dc:date>
    </item>
  </channel>
</rss>

