Sub yakubun() ' ' yakubun Macro ' マクロ記録日 : 2001/12/19 ユーザー名 : H.Miyamoto ' ' Dim MEAS(100): L = 0: GCM = 1 Sheets("約分").Select If Cells(2, 1) > Cells(3, 1) Then M = Cells(3, 1): N = Cells(2, 1) Else M = Cells(2, 1): N = Cells(3, 1) End If GoSub measure Range("C2") = Cells(2, 1) / GCM Range("C3") = Cells(3, 1) / GCM Sheets("約分").Select Range("A1") = "約分しました。 " + Str(Now()): Range("A1:F1").Select Exit Sub measure: For K = 1 To M If (M Mod K) = 0 Then L = L + 1: MEAS(L) = K Next For K = 1 To L If (N Mod MEAS(K)) = 0 Then GCM = MEAS(K) Next Return End Sub