Advertisement
peterurfi

w4-2

Mar 5th, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub bar()
  2.  
  3.   Const m = 4 ' trapézok magassága
  4.  Dim i As Byte '1-től 24-ig
  5.  Dim t(1 To 24) As Double '24 trapéz területe
  6.  
  7.   i = 1
  8.   Do While i <= 24
  9.     'Debug.Print (i)
  10.    t(i) = ((Cells(1, i).Value + Cells(2, i).Value) * 4) / 2
  11.     i = i + 1
  12.   Loop
  13.  
  14.   For j = LBound(t) To UBound(t)
  15.       If t(j) = WorksheetFunction.Min(t) Then
  16.           Debug.Print (j)
  17.           Exit For
  18.       End If
  19.   Next j
  20.  
  21. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement