🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.visualbasic
Article #838

Re: ExcelVBA SUM関数の使い方

#838
From: 長久保
Date: Sat, 24 Jan 1998 00:00
19 lines
1168 bytes
Tomotaka Tsuji <tsu-ji-@sakuranet.or.jp> wrote in article
<6ac8jv$9ta$1@news1.sphere.ad.jp>...
> excel97のマクロでSUM関数に変数を埋め込む方法についてご教授ください。
> 
> あるテキストファイルを読み込み
> 列Aにはいくつかのデータが入ります。(その数はランダムです。)
> 
>
その列Aに入ったデータの5つ下のセルにA1からA?(データの最後)までの合
計
> を求めたいのです。
> 
> 列Aに入っているデータ数はCount関数にて変数「i」に取得済みです。

Cells(i + 5, 1).FormulaR1C1 = "=SUM(R1C1:R[-5]C1)"  '(^|^)

-- 
よろずや kin-chan
Technical Details
Message-ID: <6acuj7$luu$1@horse.fsinet.or.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6ac8jv$9ta$1@news1.sphere.ad.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 105c2e,2bc9c209114cbdb0
X-Google-Attributes: gid105c2e,public
From: "長久保" <kin-chan@fsinet.or.jp>
Subject: Re: ExcelVBA SUM関数の使い方
Date: 1998/01/24
Message-ID: <6acuj7$luu$1@horse.fsinet.or.jp>
X-Deja-AN: 318858381
Content-Transfer-Encoding: 8bit
References: <6ac8jv$9ta$1@news1.sphere.ad.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-2022-JP
Organization: The FSI Network
Newsgroups: fj.lang.visualbasic