<?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: Quotes in Excel Formula in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416638#M1168957</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, replacing the inner quotes gives me an &lt;EM&gt;Unknown runtime error&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replacing the outer quotes will change the formula to a comment.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Sep 2012 09:24:51 GMT</pubDate>
    <dc:creator>gerhardl</dc:creator>
    <dc:date>2012-09-18T09:24:51Z</dc:date>
    <item>
      <title>Quotes in Excel Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416636#M1168955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I include double quotes WITHIN an excel formula I use in a macro?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;XLSheet1.Range("B1").Formula = "=INDIRECT(&lt;SPAN style="text-decoration: underline;"&gt;"A"&lt;/SPAN&gt; &amp;amp; INT(RAND()*COUNTA(A:A))+1)"&lt;/EM&gt;&lt;/STRONG&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;Here is some more detail:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using a macro, I need to add this formula to Excel:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;=INDIRECT("A" &amp;amp; INT(RAND()*COUNTA(A:A))+1)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my macro has: &lt;STRONG&gt;&lt;EM&gt;XLSheet1.Range("B1").Formula = "=INDIRECT("A" &amp;amp; INT(RAND()*COUNTA(A:A))+1)"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But because of the double quotes around "A", it gives me &lt;EM&gt;Expected end of statement&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That A is supposed to refer to column A - if I use that exact formula in excel it works perfectly, but I cannot use it in the macro.&lt;/P&gt;&lt;P&gt;If I change it to A:A then the macro runs, but the formula does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 09:16:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416636#M1168955</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-18T09:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Quotes in Excel Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416637#M1168956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does it work if you exchange either the outer or inner double quotes with single quotes?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 09:17:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416637#M1168956</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-18T09:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Quotes in Excel Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416638#M1168957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, replacing the inner quotes gives me an &lt;EM&gt;Unknown runtime error&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replacing the outer quotes will change the formula to a comment.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 09:24:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416638#M1168957</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-18T09:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Quotes in Excel Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416639#M1168958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about replacing one set of quotes with: chr(34)&lt;/P&gt;&lt;P&gt;This is the double quote ascii code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do recall there being some way to escape vbscript characters.. either using two double quotes or three..&lt;/P&gt;&lt;P&gt;like: "" instead of ", or possibly """&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 09:31:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416639#M1168958</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-18T09:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Quotes in Excel Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416640#M1168960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ha - nice:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This worked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;XLSheet1.Range("B1").Formula = "=INDIRECT(&lt;SPAN style="text-decoration: underline;"&gt;""A""&lt;/SPAN&gt; &amp;amp; INT(RAND()*COUNTA(A:A))+1)" &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I have your attention... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am exporting account numbers to column A - they can be 19 or 20 characters long and they look like this:&lt;/P&gt;&lt;P&gt;10201128030000086054&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I copy and paste them using my macro, they end up as 10201128030000000000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know how to fix that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesn't work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ActiveDocument.GetSheetObject("LB31").CopyTableToClipboard true&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;XLApp.Worksheets(1).Range("A1:A500000").NumberFormat = "@"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;XLSheet1.Paste XLSheet1.Range("A1")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;XLSheet1.Range("B1").Formula = "=INDIRECT(""A"" &amp;amp; INT(RAND()*COUNTA(A:A))+1)" &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 09:37:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416640#M1168960</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-18T09:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Quotes in Excel Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416641#M1168961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you forcing the value to be loaded as text in QlikView?&lt;/P&gt;&lt;P&gt;In that case it sounds like Excel is transforming it to a numerical value and it doesn't handle above 15 digits if I remember correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using the Text() function when loading the value into QV and see if it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 09:47:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416641#M1168961</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-18T09:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Quotes in Excel Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416642#M1168962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No unfortunately that gives me the same result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 10:13:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quotes-in-Excel-Formula/m-p/416642#M1168962</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-18T10:13:13Z</dc:date>
    </item>
  </channel>
</rss>

