{"id":5560,"date":"2012-07-11T20:00:00","date_gmt":"2012-07-11T11:00:00","guid":{"rendered":"https:\/\/mint-site.dongurikaigi.com\/?p=5560"},"modified":"2025-02-16T17:07:36","modified_gmt":"2025-02-16T08:07:36","slug":"%e7%94%bb%e6%9c%9f%e7%9a%84%e3%81%aavba%e3%82%92%e8%a6%8b%e3%81%a4%e3%81%91%e3%81%a6%e3%81%97%e3%81%be%e3%81%a3%e3%81%9f%ef%bc%be%ef%bc%be%e7%9b%ae%e3%81%8b%e3%82%89%e9%b1%97%e3%81%a0%e3%82%88","status":"publish","type":"post","link":"https:\/\/mint-site.dongurikaigi.com\/?p=5560","title":{"rendered":"\u753b\u671f\u7684\u306aVBA\u3092\u898b\u3064\u3051\u3066\u3057\u307e\u3063\u305f\uff3e\uff3e\u76ee\u304b\u3089\u9c57\u3060\u3088\uff01"},"content":{"rendered":"\n<p>\u30a8\u30af\u30bb\u30ebVBA\u306e\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u7f6e\u304f\u3068\u4f7f\u3048\u308b\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n\n\n\n\n<p>&#8216; Textcalc \u306f\u9577\u3044\u306e\u3067\u3001eg\u306b\u5909\u66f4\u30002008.02.07\u3000By\u3000Norio<br>&#8216; &#8212;\u5185\u5bb9&#8212;<br>&#8216; \u8a08\u7b97\u306b\u95a2\u4fc2\u7121\u3044\u6587\u5b57\u3092\u7121\u8996\u3059\u308b<br>&#8216; \uff12\u884c\u306b\u307e\u305f\u304c\u308b\u8a08\u7b97\u3092\u884c\u3046<br>&#8216; \u6570\u5b57\u3001\u6f14\u7b97\u8a18\u53f7\u3092\u542b\u3080\u30e1\u30e2\u66f8\u304d\u306f\u3001\u5fc5\u305a\u30ab\u30c3\u30b3\u3067\u9589\u3058\u308b<br>&#8216; =eg(\u30bb\u30eb\u756a\u53f7\uff09\u3067\u8a08\u7b97<br>&#8216;\u3000=egs(\u30bb\u30eb\u756a\u53f7,n)\u3067\u56db\u6368\u4f0d\u5165\u8a08\u7b97\u3092\u884c\u3046<br>&#8216; =egw(\u30bb\u30eb\u756a\u53f71,\u30bb\u30eb\u756a\u53f72\uff09\u3067\uff12\u884c\u8a08\u7b97<br>&#8216;\u3000=egws(\u30bb\u30eb\u756a\u53f71,\u30bb\u30eb\u756a\u53f72,n)\u3067\uff12\u884c\u56db\u6368\u4f0d\u5165\u8a08\u7b97\u3092\u884c\u3046<br>&#8216; &#8212;<br>&#8216; \u8457\u4f5c\u6a29\u306fpeace\u6c0f\u306b\u5e30\u5c5e\u3057\u307e\u3059<br>&#8216; Textcalc Version1.30 (C)1996-2000, peace<br>&#8216;<br>Option Explicit<br>Private Token As String<br>Private A1 As String<br>Private TokenType As Integer &#8216;1:DELIMITER 2:NUMBER 3:FUNCTION<br>Private S As String<br>Private SLen As Integer<br>Private K, K1, N1, N2, N3 As Integer<br>Private GP As Integer<br>Private KAKKO As Integer<br>Const MAE As String = &#8220;.0123456789)&#8221;<br>Const USIRO As String = &#8220;\u00b1\u21d2\u3006\u2225\uffe3\uff3f\uff3c\uff5c\u2203\u2642\u2640\u221a.0123456789(&#8220;<br>Const DELIMITA As String = &#8220;+-*\/()^&#8221;<br>Const NUMBER As String = &#8220;0123456789&#8221;<br>Const OKMOJI As String = &#8220;\u00b1\u21d2\u3006\u2225\uffe3\uff3f\uff3c\uff5c\u2203\u2642\u2640\u221a^()*\/+-.0123456789&#8221;<br>Const RAD As Double = 57.2957795130823<\/p>\n\n\n\n<p>&#8216; \u95a2\u6570\u306e\u30a8\u30f3\u30c8\u30ea\u30dd\u30a4\u30f3\u30c8<br>Function eg(S2 As String) As Double &#8216;textcal\u304b\u3089eg\u306b\u5909\u66f4<br>S2 = StrConv(S2, vbNarrow)<br>S2 = StrConv(S2, vbLowerCase)<br>S2 = Application.Substitute(S2, &#8221; &#8220;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u03c0&#8221;, &#8220;3.14159265358979&#8221;)<br>S2 = Application.Substitute(S2, &#8220;pi&#8221;, &#8220;3.14159265358979&#8221;)<br>S2 = Application.Substitute(S2, &#8220;rad&#8221;, &#8220;57.2957795130823&#8221;)<br>S2 = Application.Substitute(S2, &#8220;{&#8220;, &#8220;(&#8220;)<br>S2 = Application.Substitute(S2, &#8220;}&#8221;, &#8220;)&#8221;)<br>S2 = Application.Substitute(S2, &#8220;[&#8220;, &#8220;(&#8220;)<br>S2 = Application.Substitute(S2, &#8220;]&#8221;, &#8220;)&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u3014&#8221;, &#8220;(&#8220;)<br>S2 = Application.Substitute(S2, &#8220;\u3015&#8221;, &#8220;)&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u3010&#8221;, &#8220;(&#8220;)<br>S2 = Application.Substitute(S2, &#8220;\u3011&#8221;, &#8220;)&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u00d7&#8221;, &#8220;*&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u00f7&#8221;, &#8220;\/&#8221;)<br>&#8221;&#8221;&#8217;No*,\u7b2c*\u3092\u524a\u9664\u3059\u308b&#8221;&#8221;&#8217;<br>S2 = Application.Substitute(S2, &#8220;J&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;no.&#8221;, &#8220;J&#8221;)<br>S2 = Application.Substitute(S2, &#8220;no\u3001&#8221;, &#8220;J&#8221;)<br>S2 = Application.Substitute(S2, &#8220;no&#8221;, &#8220;J&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u7b2c&#8221;, &#8220;J&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u203b&#8221;, &#8220;J&#8221;)<br>N2 = 0<br>N3 = 0<br>For K = 1 To Len(S2) &#8216;J\u306e\u6570\u3092\u6570\u3048\u308b<br>If Mid(S2, K, 1) = &#8220;J&#8221; Then N2 = N2 + 1<br>Next<br>Do While N2 &gt; 0 &#8216;&#8221;J&#8221;\u3068\u6b21\u306e&#8221;J&#8221;\u53c8\u306f&#8221;)&#8221;\u306e\u6587\u5b57\u4f4d\u7f6e\u3092\u6c42\u3081\u308b<br>N1 = InStr(S2, &#8220;J&#8221;)<br>If InStr(N1 + 1, S2, &#8220;J&#8221;) &gt; 0 And InStr(N1 + 1, S2, &#8220;J&#8221;) &lt;= InStr(N1 + 1, S2, &#8220;)&#8221;) _<br>Then N3 = InStr(N1 + 1, S2, &#8220;J&#8221;) Else N3 = InStr(N1 + 1, S2, &#8220;)&#8221;)<br>If InStr(N1 + 1, S2, &#8220;J&#8221;) = 0 Then N3 = InStr(N1 + 1, S2, &#8220;)&#8221;)<br>A1 = &#8220;&#8221;<br>For K = 1 To Len(S2) &#8216;&#8221;J&#8221;\u3068\u6b21\u306e&#8221;J&#8221;\u53c8\u306f&#8221;)&#8221;\u306e\u9593\u306e\u6587\u5b57\u3092\u524a\u9664<br>If K &lt; N1 Or K &gt;= N3 Then A1 = A1 + Mid(S2, K, 1)<br>Next K<br>S2 = A1<br>N2 = N2 &#8211; 1<br>Loop<br>&#8221;&#8221;&#8217;<br>S2 = Application.Substitute(S2, &#8220;\u00b1&#8221;, &#8220;&#8221;) &#8216;\u4e0b\u3067\u4f7f\u7528\u3059\u308b\u6587\u5b57\u3092\u524a\u9664\u3057\u3066\u304a\u304f<br>S2 = Application.Substitute(S2, &#8220;\u21d2&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u3006&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u2225&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\uffe3&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\uff3f&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\uff3c&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\uff5c&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u2203&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u2642&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u2640&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;asin&#8221;, &#8220;\u00b1&#8221;) &#8216;\u4e88\u7d04\u8a9e\u3092\u7279\u6b8a\u6587\u5b57\u306b\u7f6e\u304d\u63db\u3048\u308b<br>S2 = Application.Substitute(S2, &#8220;acos&#8221;, &#8220;\u21d2&#8221;)<br>S2 = Application.Substitute(S2, &#8220;atan&#8221;, &#8220;\u3006&#8221;)<br>S2 = Application.Substitute(S2, &#8220;sin&#8221;, &#8220;\u2225&#8221;)<br>S2 = Application.Substitute(S2, &#8220;cos&#8221;, &#8220;\uffe3&#8221;)<br>S2 = Application.Substitute(S2, &#8220;tan&#8221;, &#8220;\uff3f&#8221;)<br>S2 = Application.Substitute(S2, &#8220;abs&#8221;, &#8220;\uff3c&#8221;)<br>S2 = Application.Substitute(S2, &#8220;int&#8221;, &#8220;\uff5c&#8221;)<br>S2 = Application.Substitute(S2, &#8220;exp&#8221;, &#8220;\u2203&#8221;)<br>S2 = Application.Substitute(S2, &#8220;log&#8221;, &#8220;\u2642&#8221;)<br>S2 = Application.Substitute(S2, &#8220;ln&#8221;, &#8220;\u2640&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\/m3&#8221;, &#8220;&#8221;) &#8216;\/m3,\/m2,\/m,m2,m3,m4\u3092\u524a\u9664<br>S2 = Application.Substitute(S2, &#8220;\/m2&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\/m&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;m2&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;m3&#8221;, &#8220;&#8221;)<br>S2 = Application.Substitute(S2, &#8220;m4&#8221;, &#8220;&#8221;)<br>&#8221;&#8221;&#8217;\u4e88\u7d04\u8a9e\u3001\u6570\u5b57\u3001\u6f14\u7b97\u8a18\u53f7\u4ee5\u5916\u3092\u524a\u9664\u3059\u308b&#8221;&#8221;&#8217;<br>A1 = &#8220;&#8221;<br>For K = 1 To Len(S2)<br>For K1 = 1 To Len(OKMOJI)<br>If Mid(S2, K, 1) = Mid(OKMOJI, K1, 1) Then A1 = A1 + Mid(S2, K, 1)<br>Next K1<br>Next K<br>S2 = A1<br>S2 = Application.Substitute(S2, &#8220;()&#8221;, &#8220;&#8221;)<br>&#8221;&#8221;&#8217;memo\u306e\u524a\u9664\uff08memo\u304c\u6700\u521d\u306b\u3042\u308b\u5834\u5408\uff09&#8221;&#8221;&#8217;<br>If Mid(S2, 1, 1) &lt;&gt; &#8220;(&#8221; Then GoTo line1<br>N3 = 0<br>For K = 1 To Len(S2)<br>For K1 = 1 To Len(USIRO)<br>If Mid(S2, K, 1) = &#8220;)&#8221; And Mid(S2, K + 1, 1) = Mid(USIRO, K1, 1) Then N3 = K<br>Next<br>Next<br>A1 = &#8220;&#8221;<br>For K = 1 To Len(S2) &#8221;&#8221;&#8217;memo\u306e&#8221;(&#8220;\u304b\u3089&#8221;)&#8221;\u307e\u3067\u306e\u6587\u5b57\u3092\u524a\u9664<br>If K &gt; N3 Then A1 = A1 + Mid(S2, K, 1)<br>Next K<br>S2 = A1<br>&#8221;&#8221;&#8217;memo\u306e\u524a\u9664\uff08memo\u304c\u4e2d\u9593\u53c8\u306f\u6700\u5f8c\u306b\u3042\u308b\u5834\u5408\uff09&#8221;&#8221;&#8217;<br>line1:<br>A1 = &#8220;&#8221;<br>N1 = 0<br>N2 = 0<br>For K = 2 To Len(S2) &#8221;&#8221;&#8217;memo\u306e\u6570\u3092\u6570\u3048\u308b<br>For K1 = 1 To Len(MAE)<br>If Mid(S2, K, 1) = &#8220;(&#8221; And Mid(S2, K &#8211; 1, 1) = Mid(MAE, K1, 1) Then N2 = N2 + 1<br>Next<br>Next<br>Do While N2 &gt; 0<br>For K = 2 To Len(S2)<br>For K1 = 1 To Len(MAE)<br>If Mid(S2, K, 1) = &#8220;(&#8221; And Mid(S2, K &#8211; 1, 1) = Mid(MAE, K1, 1) Then N1 = K<br>N3 = InStr(N1 + 1, S2, &#8220;)&#8221;)<br>Next<br>Next<br>A1 = &#8220;&#8221;<br>For K = 1 To Len(S2) &#8221;&#8221;&#8217;memo\u306e&#8221;(&#8220;\u304b\u3089&#8221;)&#8221;\u307e\u3067\u306e\u6587\u5b57\u3092\u524a\u9664<br>If K &lt; N1 Or K &gt; N3 Then A1 = A1 + Mid(S2, K, 1)<br>Next K<\/p>\n\n\n\n<p>S2 = A1<br>N2 = N2 &#8211; 1<br>Loop<br>&#8221;&#8221;&#8217;<br>S2 = Application.Substitute(S2, &#8220;\u00b1&#8221;, &#8220;asin&#8221;) &#8216;\u4e88\u7d04\u8a9e\u3092\u5143\u306b\u623b\u3059<br>S2 = Application.Substitute(S2, &#8220;\u21d2&#8221;, &#8220;acos&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u3006&#8221;, &#8220;atan&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u2225&#8221;, &#8220;sin&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\uffe3&#8221;, &#8220;cos&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\uff3f&#8221;, &#8220;tan&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\uff3c&#8221;, &#8220;abs&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\uff5c&#8221;, &#8220;int&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u2203&#8221;, &#8220;exp&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u2642&#8221;, &#8220;log&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u2640&#8221;, &#8220;ln&#8221;)<br>S2 = Application.Substitute(S2, &#8220;\u221a&#8221;, &#8220;sqrt&#8221;)<br>KAKKO = 0<br>GP = 1<br>S = S2<br>SLen = Len(S)<\/p>\n\n\n\n<p>GetToken<br>eg = sub1(0#)<br>If (KAKKO &lt;&gt; 0) Then<br>MsgBox &#8220;\u62ec\u5f27\u306e\u6307\u5b9a\u306b\u8aa4\u308a\u304c\u3042\u308a\u307e\u3059\u3002&#8221; _<br>, vbOKOnly + vbExclamation, &#8220;EG\u95a2\u6570&#8221;<br>eg = 1 \/ 0 &#8216;textcalc\u304b\u3089eg\u306b\u5909\u66f4<br>End If<br>End Function<\/p>\n\n\n\n<p>&#8216; \u52a0\u7b97\u30fb\u6e1b\u7b97\u306e\u51e6\u7406<br>Function sub1(Value As Double) As Double<br>Dim Value2 As Double<br>Dim Token2 As String<\/p>\n\n\n\n<p>Value = sub2(Value)<br>While Token = &#8220;+&#8221; Or Token = &#8220;-&#8220;<br>Token2 = Token<br>GetToken<br>Value2 = sub2(Value2)<br>Select Case Token2<br>Case &#8220;+&#8221;<br>Value = Value + Value2<br>Case &#8220;-&#8220;<br>Value = Value &#8211; Value2<br>End Select<br>Wend<br>sub1 = Value<br>End Function<\/p>\n\n\n\n<p>&#8216; \u4e57\u7b97\u3001\u9664\u7b97\u306e\u51e6\u7406<br>Function sub2(Value As Double) As Double<br>Dim Value2 As Double<br>Dim Token2 As String<br>Value = sub3(Value)<br>While Token = &#8220;*&#8221; Or Token = &#8220;\/&#8221;<br>Token2 = Token<br>GetToken<br>Value2 = sub3(Value2)<br>Select Case Token2<br>Case &#8220;*&#8221;<br>Value = Value * Value2<br>Case &#8220;\/&#8221;<br>Value = Value \/ Value2<br>End Select<br>Wend<br>sub2 = Value<br>End Function<\/p>\n\n\n\n<p>&#8216; \u3079\u304d\u4e57\u306e\u51e6\u7406<br>Function sub3(Value As Double) As Double<br>Dim Value2 As Double<br>Dim Token2 As String<br>Value = sub4(Value)<br>While Token = &#8220;^&#8221;<br>Token2 = Token<br>GetToken<br>Value2 = sub4(Value2)<br>Select Case Token2<br>Case &#8220;^&#8221;<br>Value = Value ^ Value2<br>End Select<br>Wend<br>sub3 = Value<br>End Function<\/p>\n\n\n\n<p>&#8216; \u5358\u9805\u6f14\u7b97\u5b50\u306e\u51e6\u7406<br>Function sub4(Value As Double) As Double<br>Dim Token2 As String<br>If Token = &#8220;+&#8221; Or Token = &#8220;-&#8221; Then<br>Token2 = Token<br>GetToken<br>End If<br>Value = sub5(Value)<br>If Token2 = &#8220;-&#8221; Then<br>Value = -Value<br>End If<br>sub4 = Value<br>End Function<\/p>\n\n\n\n<p>&#8216; \u62ec\u5f27\u306e\u51e6\u7406<br>Function sub5(Value As Double) As Double<br>If Token = &#8220;(&#8221; Then<br>GetToken<br>Value = sub1(Value)<br>GetToken<br>Else<br>Value = Atom()<br>End If<br>sub5 = Value<br>End Function<\/p>\n\n\n\n<p>&#8216; \u6570\u5024\u306e\u51e6\u7406<br>Function Atom() As Double<br>Dim temp As String<br>Dim i As Integer<br>Dim Value2 As Double<br>If TokenType = 3 Then<br>Atom = Func(Token)<br>ElseIf TokenType = 2 Then<br>Atom = Val(Token)<br>GetToken<br>End If<\/p>\n\n\n\n<p>End Function<\/p>\n\n\n\n<p>&#8216;\u7b97\u8853\u95a2\u6570\u306e\u51e6\u7406<br>Function Func(str As String) As Double<br>Dim Value2 As Double<br>Dim str2 As Double<br>Select Case str<br>Case &#8220;sin&#8221;<br>GetToken<br>Value2 = sub4(Value2)<br>Func = Sin(Value2 \/ RAD)<br>Case &#8220;cos&#8221;<br>GetToken<br>Value2 = sub4(Value2)<br>Func = Cos(Value2 \/ RAD)<br>Case &#8220;tan&#8221;<br>GetToken<br>Value2 = sub4(Value2)<br>Func = Tan(Value2 \/ RAD)<br>Case &#8220;asin&#8221;<br>GetToken<br>Value2 = sub4(Value2)<br>Func = WorksheetFunction.Asin(Value2) * RAD<br>Case &#8220;acos&#8221;<br>GetToken<br>Value2 = sub4(Value2)<br>Func = WorksheetFunction.Acos(Value2) * RAD<br>Case &#8220;atan&#8221;<br>GetToken<br>Value2 = sub4(Value2)<br>Func = Atn(Value2) * RAD<br>Case &#8220;abs&#8221;<br>GetToken<br>Value2 = sub4(Value2)<br>Func = Abs(Value2)<br>Case &#8220;int&#8221;<br>GetToken<br>Value2 = sub4(Value2)<br>Func = Int(Value2)<br>Case &#8220;exp&#8221;<br>GetToken<br>Value2 = sub4(Value2)<br>Func = Exp(Value2)<br>Case &#8220;log&#8221;<br>GetToken<br>Value2 = sub4(Value2)<br>Func = Log(Value2) \/ Log(10#) &#8216;&#8221;\/ Log(10#)&#8221;\u3092\u8ffd\u52a0<br>Case &#8220;ln&#8221; &#8216;\u8ffd\u52a0<br>GetToken &#8216;\u8ffd\u52a0<br>Value2 = sub4(Value2) &#8216;\u8ffd\u52a0<br>Func = Log(Value2) &#8216;\u8ffd\u52a0<br>Case &#8220;sqrt&#8221;<br>GetToken<br>Value2 = sub4(Value2)<br>Func = Sqr(Value2)<br>Case Else<br>MsgBox &#8220;\u95a2\u6570 &#8221; + str + &#8221; \u306f\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002&#8221; _<br>, vbOKOnly + vbExclamation, &#8220;EG\u95a2\u6570&#8221;<br>Func = 1 \/ 0<br>End Select<br>End Function<\/p>\n\n\n\n<p>&#8216; \u30c8\u30fc\u30af\u30f3\u306e\u5207\u51fa\u3057<br>Function GetToken()<br>Dim i As Integer<\/p>\n\n\n\n<p>If GP &gt; SLen Then<br>Token = &#8220;&#8221;<br>Exit Function<br>End If<br>If InStr(DELIMITA, Mid(S, GP, 1)) &lt;&gt; 0 Then<br>Token = Mid(S, GP, 1)<br>TokenType = 1<br>GP = GP + 1<br>If Token = &#8220;(&#8221; Then &#8216;\u62ec\u5f27\u306e\u30c1\u30a7\u30c3\u30af<br>KAKKO = KAKKO + 1<br>ElseIf Token = &#8220;)&#8221; Then<br>KAKKO = KAKKO &#8211; 1<br>End If<br>ElseIf InStr(NUMBER, Mid(S, GP, 1)) &lt;&gt; 0 Then<br>For i = GP To SLen<br>If InStr(DELIMITA, Mid(S, i, 1)) &lt;&gt; 0 Then<br>Exit For<br>End If<br>Next<br>Token = Mid(S, GP, i &#8211; GP)<br>TokenType = 2<br>GP = i<br>Else<br>For i = GP To SLen<br>If InStr(DELIMITA, Mid(S, i, 1)) &lt;&gt; 0 Then<br>Exit For<br>End If<br>Next<br>Token = Mid(S, GP, i &#8211; GP)<br>TokenType = 3<br>GP = i<br>End If<br>End Function<\/p>\n\n\n\n<p>&#8216; \u56db\u6368\u4e94\u5165\u8a08\u7b97<br>Function egs(S2 As String, kurai As Integer) As Double<br>egs = Application.Round(eg(S2), kurai)<br>End Function<br>&#8216; \uff12\u884c\u306e\u8a08\u7b97<br>Function egw(G1 As String, G2 As String) As Double<br>egw = eg(G1 + G2)<br>End Function<br>&#8216; \uff12\u884c\u56db\u6368\u4e94\u5165\u8a08\u7b97<br>Function egws(G1 As String, G2 As String, kurai As Integer) As Double<br>egws = Application.Round(eg(G1 + G2), kurai)<br>End Function<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a8\u30af\u30bb\u30ebVBA\u306e\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u7f6e\u304f\u3068\u4f7f\u3048\u308b\u3002 &#8216; Textcalc \u306f\u9577\u3044\u306e\u3067\u3001eg\u306b\u5909\u66f4\u30002008.02.07\u3000By\u3000Norio&#8216; &#8212;\u5185\u5bb9&#8212;&#8216; \u8a08\u7b97\u306b\u95a2\u4fc2\u7121 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[237],"tags":[1188],"class_list":["post-5560","post","type-post","status-publish","format-standard","hentry","category-excel","tag-vba"],"_links":{"self":[{"href":"https:\/\/mint-site.dongurikaigi.com\/index.php?rest_route=\/wp\/v2\/posts\/5560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mint-site.dongurikaigi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mint-site.dongurikaigi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mint-site.dongurikaigi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mint-site.dongurikaigi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5560"}],"version-history":[{"count":1,"href":"https:\/\/mint-site.dongurikaigi.com\/index.php?rest_route=\/wp\/v2\/posts\/5560\/revisions"}],"predecessor-version":[{"id":31867,"href":"https:\/\/mint-site.dongurikaigi.com\/index.php?rest_route=\/wp\/v2\/posts\/5560\/revisions\/31867"}],"wp:attachment":[{"href":"https:\/\/mint-site.dongurikaigi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mint-site.dongurikaigi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mint-site.dongurikaigi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}