Excel Excel Excel 20132 20 = 1048576 Excel 201316 100 III 7 (2014 11 18 ) 1



Similar documents
Excel Excel Excel = Excel ( ) 1

B 5 (2) VBA R / B 5 ( ) / 34

コンピュータ概論

My関数の作成演習問題集

コンピュータ概論

Microsoft Word - VBA基礎(3).docx

94 expression True False expression FalseMSDN IsNumber WorksheetFunctionIsNumberexpression expression True Office support.office.com/ja-jp/ S

D0020.PDF

PowerPoint プレゼンテーション

untitled

45 VBA Fortran, Pascal, C Windows OS Excel VBA Visual Basic Excel VBA VBA Visual Basic For Application Microsoft Office Office Excel VBA VBA Excel Acc

MS-ExcelVBA 基礎 (Visual Basic for Application)

sinfI2005_VBA.doc

D0120.PDF

Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.

BASICとVisual Basic

ケミカルエンジニアのためのExcelを用いた化学工学計算法

<4D F736F F D208DEC90AC837D836A B81698F4390B394C5816A2E646F63>

74 No ACCESS



ExcelVBA


橡Taro9-生徒の活動.PDF

本サンプル問題の著作権は日本商工会議所に帰属します また 本サンプル問題の無断転載 無断営利利用を厳禁します 本サンプル問題の内容や解答等に関するお問 い合わせは 受け付けておりませんので ご了承ください 日商プログラミング検定 STANDARD(VBA) サンプル問題 知識科目 第 1 問 ( 知

untitled

saihata.doc

Microsoft PowerPoint - VBA解説1.ppt [互換モード]

PowerPoint プレゼンテーション

Lesson 1 1 EXVBA2000 Lesson01 Lesson01.xls 2

.NETプログラマー早期育成ドリル ~VB編 付録 文法早見表~

CommandMatrix_8230E

untitled

Microsoft PowerPoint - Visualプログラミング

●70974_100_AC009160_KAPヘ<3099>ーシス自動車約款(11.10).indb

ギリシャ文字の読み方を教えてください

D0090.PDF

改訂版 :基本的な文字化の原則(Basic Transcription System for Japanese: BTSJ)

Microsoft Word 練習問題の解答.doc

一般的なプログラムの実行

untitled

の包絡線を求めることになる 包絡線は一次式で表せるのでこのときの係数 ( 切片 ) を求 めればよいことになる この係数 ( 切片 ) が粘着力となる 包絡線はモールの応力円に外 接する直線であるため 包絡線の式は下記三式を解くことにより求めることができる 包絡線の式 Y=A1 X + B1 ---

商学論叢 第55巻 第1号

Excelで解く配管設計法

バスケットボール

untitled

Microsoft PowerPoint - vp演習課題

ExcelVBA Excel VBA Microsoft Excel VBA Visual Basic for Applications Excel Excel VBA ExcelVBA Excel ExcelVBA Excel VBA Excel ExcelVBA ExcelVBA VBA Ran

Lecture on

REALV5_A4…p_Ł\1_4A_OCF

untitled

「都市から地方への人材誘致・移住促進に関する調査」

<91498EE88CA D815B2E786C73>

〔 大 会 役 員 〕

橡本体資料+参考条文.PDF

270万回再生レポート

ルーレットプログラム

[Excelが自動化するVBAの魔法2]購入者限定テキスト

Microsoft Word - VBA基礎(6).docx

-34-

AccessVBA−‹ŠpŁÒ-flO“Z

2 1 F M m r G F = GMm r 2 (1.1) (1.1) (r = r ) F = GMmr r 3 (1.2) a F m F = kma k 1 F = ma (1.3) (1.2) (1.3) ma = GMmr r 3 (1.4)


PowerPoint プレゼンテーション

VB 資料 電脳梁山泊烏賊塾 音声認識 System.Speech の利用 System.Speech に依るディクテーション ( 音声を文字列化 ).NetFramework3.0 以上 (Visual Studio 2010 以降 ) では 標準で System.Speech が用意されて居るの

PowerPoint プレゼンテーション

卒業論文.PDF

ii Excel Excel IF IF IF VLOOKUP HLOOKUP IF VLOOKUP HLOOKUP ExcelVBA Excel Excel Excel Web p Excel Excel Excel

(Microsoft Word \203v\203\215\203O\203\211\203~\203\223\203O)

PowerPoint プレゼンテーション

Transcription:

III 7 VBA / III 7 (2014 11 18 )

Excel Excel Excel 20132 20 = 1048576 Excel 201316 100 III 7 (2014 11 18 ) 1

Excel VBA Excel Excel 2 20 Excel QR Excel R QR QR BLASLAPACK III 7 (2014 11 18 ) 2

VBA VBA (Visual Basic for Applications) Visual Basic VBAVisual Basic Visual BasicC III 7 (2014 11 18 ) 3

VBA 6-1b.xlsx 2 Excel.xlsm 01 Sub test() 02 Dim tmp As Double 03 tmp = Worksheets("Sheet1").Range("C4").Value 04 tmp = tmp * tmp 05 Range("E4").Value = tmp 06 Range("F4").Value = "=POWER(C4,2)" 07 MsgBox(": =" + CStr(tmp)) 08 End Sub test III 7 (2014 11 18 ) 4

VBA 0108Subtest 1test 02 Double tmp Dim As Doubletmp Dim As As III 7 (2014 11 18 ) 5

VBA 03Sheet1C4tmp = "" 04tmp2tmp 05E4tmpE4 III 7 (2014 11 18 ) 6

VBA 06 F4 "=POWER(C4,2)" 07 ": =" + CStr(tmp) +"AB"+"CD""ABCD" CStr() III 7 (2014 11 18 ) 7

VBA VBA 02 Dim tmp As Double 02 dim tmp as double "a" "A" III 7 (2014 11 18 ) 8

VBA : Integer : 2 15 2 15 Long : 2 31 2 31 Currency : 2 63 2 63 Single : 106 Double : 1015 String : Boolean : TrueFalse Variant : III 7 (2014 11 18 ) 9

VBA : + : 3+47 - : 3-4-1 * : 3*412 / : 3/41 \ (or ) : 3\40 Mod : 8 Mod 32 ^ : 3^23 2 9 () III 7 (2014 11 18 ) 10

VBA () IfElseIfElseEnd If 01 If A Then 02 A 03 ElseIf B Then 04 AB 05 ElseIf C Then 06 A, BC 07 Else 08 A, B, C 09 End If ElseIf0Else III 7 (2014 11 18 ) 11

VBA () A = B : ABTrue= A < B : ABTrue A > B : ABTrue A <= B : ABTrue A >= B : ABTrue A <> B : ABTrue A And B : ABTrueTrue A Or B : ABTrue True Not A : ATrueTrue III 7 (2014 11 18 ) 12

VBA (For) ForForNext 01 For = To Step 02 03 Next Step 1 III 7 (2014 11 18 ) 13

VBA (For) 01 Dim i As Integer 02 For i = 3 To 10 Step 2 03 (i=3, 5, 7, 94) 04 Next 01 Dim i As Integer 02 For i = 1 To 5 03 (i=1, 2, 3, 4, 55) 04 Next 01 Dim i As Integer 02 For i = 10 To 3 Step -3 03 (i=10, 7, 43) 04 Next III 7 (2014 11 18 ) 14

VBA (For) ForExit For 01 Dim i As Integer 02 For i = 3 To 10 Step 2 03 If i = 7 Then 04 Exit For i=7for 05 End If 06 (i=3, 52) 07 Next III 7 (2014 11 18 ) 15

VBA (Do) DoLoopExit Do 01 Dim i As Integer 02 i = 1 03 Do 04 (i=1, 2, 3, 44) 05 i = i + 1 06 If i = 5 Then 07 Eixt Do 08 End If 09 Loop III 7 (2014 11 18 ) 16

VBA (Do, While) DoLoop While 01 Dim i As Integer 02 i = 1 03 Do While i < 5 04 (i=1, 2, 3, 44) 05 i = i + 1 06 Loop 01 Dim i As Integer 02 i = 10 03 Do While i < 5 04 (1) 05 i = i + 1 06 Loop III 7 (2014 11 18 ) 17

VBA CInt : Integer CLng : Long CSng : Single CDbl : Double CStr : String III 7 (2014 11 18 ) 18

VBA 1 Dim () As (0)(1)...()+1 01 Dim i As Integer 02 Dim arr(5) As Integer 03 For i = 0 To 5 04 arr(i) = i * i 05 Next arr(0) 0 arr(3) 9 arr(5) 25 III 7 (2014 11 18 ) 19

VBA 01 Dim i As Integer 02 Dim arr(5) As Integer 01 Dim i As Integer, arr(5) As Integer 01 Dim i, arr(5) As Integer ivariant III 7 (2014 11 18 ) 20

VBA Worksheets("Sheet1").Range("C4").Value Worksheets("Sheet1").Cells(4,3).Value C4Worksheets("Sheet1"). III 7 (2014 11 18 ) 21

VBA Range Range("D2:E4").Value Range(Cells(2, 4), Cells(4, 5)).Value Range(Cells(2, 4), Cells(4, 5)).Value = 1.5 1.5 III 7 (2014 11 18 ) 22

VBA Cells(3, 2).Interior.Color = RGB(255, 0, 0) 32RGB0255 Cells(3, 2).RowHeight = 100 Cells(3, 2).ColumnWidth = 100 31002100 III 7 (2014 11 18 ) 23

Excel Calls(2,1).Value = "=POWER(A1,2)" x = Calls(2,1).Value "=POWER(A1,2)"A12 x = Application.Power(Cells(1,1),2) x = Application.Power(4,2) x16 III 7 (2014 11 18 ) 24

VBA (SubFunction) Sub A B QR QR 2 QR A B 2 III 7 (2014 11 18 ) 25

VBA Sub FunctionSub 01 Sub Kaku(n As Long) 02 Dim i As Long 03 For i = 1 To n 04 Cells(i, 1) = 0 05 Next 06 End Sub Call Kaku(5) Kaku 5 150 III 7 (2014 11 18 ) 26

VBA 01 Function MySum(n As Long) 02 Dim i As Long, s As Long 03 s = 0 04 For i = 1 To n 05 s = s + i 06 Next 07 MySum = s 08 End Function n = MySum(5)n1+2+3+ 4 + 515 III 7 (2014 11 18 ) 27

VBA III 7 (2014 11 18 ) 28

VBA 6-1b.xlsx 22 III 7 (2014 11 18 ) 29

VBA Longi, male, female IntegersexDoubleheight, weight i2male, female0 Do, Loop11 III 7 (2014 11 18 ) 30

VBA iexit Do isex, height, weight sex-1male1 5male6male sex1female1 8female9female i1 5689 III 7 (2014 11 18 ) 31

VBA 01 Sub Kadai() 02 Dim i As Long, male As Long, female As Long 03 Dim sex As Integer 04 Dim height As Double, weight As Double 05 i = 2 2 06 male = 0 07 female = 0 08 Do 09 If Cells(i, 1) = "" Then 10 Exit Do 11 End If 12 sex = Cells(i, 1).Value 13 height = Cells(i, 2).Value 14 weight = Cells(i, 3).Value III 7 (2014 11 18 ) 32

VBA 15 If sex = -1 Then 16 male = male + 1 17 Cells(male, 5) = height 18 Cells(male, 6) = weight 19 Else 20 female = female + 1 21 Cells(female, 8) = height 22 Cells(female, 9) = weight 23 End If 24 i = i+1 25 Loop 26 End Sub III 7 (2014 11 18 ) 33

VBA VBA 23 234 III 7 (2014 11 18 ) 34