Advertisement
Guest User

Untitled

a guest
Nov 16th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub Macro1()
  2. '
  3. ' Macro1 Макрос
  4. '
  5. Dim d As Double
  6. For i = 1 To 3
  7.    
  8.     For j = 1 To 3
  9.         If Not i = j Then
  10.            
  11.             d = Cells(j, i).Value / Cells(i, i).Value
  12.            
  13.             For x = 1 To 4
  14.                 Cells(j, x).Value = Cells(j, x).Value - Cells(i, x).Value * d
  15.                
  16.             Next x
  17.            
  18.         End If
  19.        
  20.     Next j
  21. Next i
  22. For i = 1 To 3
  23.     Cells(i, 4) = Cells(i, 4) / Cells(i, i)
  24.     Cells(i, i) = 1
  25. Next i
  26.  
  27.  
  28. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement