Nepoznati kod, nepoznata funkcija koju obavlja

12/26/2020

Option Explicit

Sub ApsRazlika()

Dim i, j, brnula As Integer

Dim razlika As Long

Dim rng1 As Range

Dim op_cell As Integer

Dim kraj As Boolean

Set rng1 = Range("1:1")

op_cell = WorksheetFunction.Count(rng1)

i = 1

While (Not kraj)

brnula = 0

For j = 1 To op_cell - 1

razlika = Abs(Cells(i, j + 1) - Cells(i, j))

Cells(i + 1, j) = razlika

If (razlika = 0) Then

brnula = brnula + 1

End If

Next j

razlika = Abs(Cells(i, op_cell) - Cells(i, 1))

Cells(i + 1, op_cell) = razlika

If (brnula = op_cell - 1) And (razlika = 0) Then

kraj = True

End If

i = i + 1

Wend

End Sub 

© 2020 Ljubinko Stojanović. All rights reserved.
Powered by Webnode
Create your website for free! This website was made with Webnode. Create your own for free today! Get started