Prikazi cijelu temu 06.06.2015 08:58
Avko Van mreze
Administrator
Registrovan od:28.05.2014
Lokacija:zagreb


Predmet:Re: pomoc oko vloocap funkcije
u funkciji jeli treba dodaati End If i Next Red

PreuzmiIzvorni kôd (Visual Basic):
  1. Function Nadji_Vrijednost(ImeS As String, Rn As Range, Sifra As Integer) As Integer
  2. Dim Sit As Worksheet
  3. Dim Red As Range, RedB As Integer
  4. Dim CEL As Range, R As Range
  5. Dim a
  6.  
  7. a = Rn.Address
  8. Set Sit = Worksheets(ImeS)
  9. Sit.Activate
  10. Set R = Sit.Range(a)
  11. For Each Red In R.Rows
  12.         If Red = Sifra Then
  13.                 RedB = Red.Cells.Row
  14.                 Set CEL = Sit.Cells(RedB, 34)
  15.                 Nadji_Vrijednost = CEL.Cells
  16.        End If 'jeli treba ovo
  17. Next Red' i jeli treba ovo
  18. End If

zivot je moja domovina.