アメリカの大学生活---日記

ミネソタ州立大学ムーアヘッド校 2015年-2017年の日記

Excel

練習問題15(Withの練習) メモ

excel-ubara.com With ステートメント excel-ubara.com Sub 練習問題15() Dim i As Long Dim ixR As Long Dim ixC As Long Dim ws1 As Worksheet Dim ws2 As Worksheet Set ws1 = Worksheets("練習15") Set ws2 = Worksheets("練習15_回答") ws2.Range("A1")…

練習問題14(行の挿入・削除の練習) メモ

excel-ubara.com Sub Practice14() Dim i As Long For i = Cells(Rows.Count, 1).End(xlUp).Row To Step - 1 Select Case Cells(i, 1) Case "I" Rows(i).Inser Case "D" Rows(i).Delete End Select NextEnd Sub

練習問題13(文字列関数の練習) メモ

excel-ubara.com Sub Practice13() Dim i As Long Dim strPref As String Dim strCity As String Range("G2:I8").ClearContents For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row If InStr(Cells(i, 1), "(") > 0 Then strPref = Left(Cells(i, 1), InStr(C…

練習問題12(日付関数の練習)) メモ

excel-ubara.com Sub Pra12() Dim i As Long Dim intW As Integer Range("G2:I8").ClearContents For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row intW = Weekday(DateSerial(Cells(i, 1), Cells(i, 2), Cells(i, 3)), vbMonday) Cells(intW + 1, 7) = Cel…

練習問題11(色々なコピーの練習) メモ

excel-ubara.com Sub 練習問題11() Range("A1:B6").Copy Range("D1") Range("A1:B6").Copy Range("G1").PasteSpecial Paste:=xlPasteValues Application.CutCopyMode = FalseEnd Sub

練習問題10(罫線の練習)メモ

excel-ubara.com Sub 練習問題10() Dim i As Long Dim lastRow As Long lastRow = Cells(Rows.Count, 1).End(xlUp).Row For i = 2 To lastRow Cells(i, 4) = Cells(i, 2) / Cells(i, 3) Next Range(Cells(2, 4), Cells(lastRow, 4)).NumberFormatLocal = "#,…

練習問題9(文字色・背景色の練習) メモ

excel-ubara.com Sub Practice9() Dim i As Long For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row Cells(i, 4) = Cells(i, 3) / Cells(i, 2) Select Case Cells(i, 4) Case Is >= 1.05 Cells(i, 4).Interior.Color = vbBlue Cells(i, 4).Font.Color = vbWh…

練習問題8(表示形式の練習)メモ

excel-ubara.com Sub 8() Dim i As Long For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row Cells(i, 4) = Cells(i, 2) * Cells(i, 3) Next Columns(1).NumberFormatLocal = "yyyy/mm/dd" Columns(4).NumberFormatLocal = "#,##0"End Sub

練習問題7(メッセージボックスの練習)メモ

excel-ubara.com - 文字と文字の結合の場合は、&(アンパサンド)を使ってつなげる - CntはCount excel-ubara.com excel-ubara.com excel-ubara.com Sub Practice7() Dim i As Long Dim lngTotal As Long Dim lngCnt As Long lngTotal = 0 lngCnt = 0 For i …

練習問題6(変数を使っての合計の練習)メモ

excel-ubara.com Sub Practice6() Dim i As Long Dim lngTotal As Long Dim lastRow As Long lngTotal = 0 lastRow = Cells(Rows.Count, 1).End(xlUp).Row For i = 2 To lastRow Cells(i, 4) = Cells(i, 2) * Cells(i, 3) lngTotal = lntTotal + Cells(i, 4)…

マクロ練習問題3 (二重ループの練習) メモ

excel-ubara.com Sub 練習問題3() Dim i As long Dim j As long For i = 2 To 11 For j = 2 To 11 Cells(i,j) = Cells(i,1)*Cells(1,i) Next Next End Sub

マクロ練習問題1 メモ

excel-ubara.com Sub 練習問題1() Dim i As Long For i = 2 To 11 Cells(i, 4) = Cells(i, 2) / Cells(i, 3) NextEnd Sub excel-ubara.com For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row 覚える excel-ubara.com Sub 総合練習問題1()Dim i As Long For i…

SUMIF, Vlookup, and Pivot Table

経理、会計業務にはマストらしいので、練習用にメモ。 xn--nzwp8lqtiu0t.xyz xn--nzwp8lqtiu0t.xyz moritahyoukeisan.com excel-ubara.com www.xn--lhry58ekee5td.com