Advertisement
Joksa

Untitled

Jun 9th, 2020
1,505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DAN 2
  2. Sub Macro1()
  3. '
  4. ' Macro2 Macro
  5.    Dim cell As Range
  6.    
  7.     Cells.Find(What:="201", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
  8.         xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
  9.         , SearchFormat:=False).Activate
  10.     For Each cell In Cells
  11.         Range(ActiveCell.Offset(0, 1), ActiveCell.Offset(0, 1)).Select
  12.         If ActiveCell.HasFormula = True Then
  13.             MsgBox "GOTOVO!"
  14.             Exit For
  15.         End If
  16.         ActiveCell.Formula = "=ROUND(" + Range(ActiveCell.Offset(-1, 0), ActiveCell.Offset(-1, 0)).AddressLocal() + "*0.115, 0)"
  17.         Range(ActiveCell.Offset(0, -1), ActiveCell.Offset(0, -1)).Select
  18.         If ActiveCell.HasFormula = False Then
  19.             Cells.FindNext(After:=ActiveCell).Activate
  20.         End If
  21.     Next cell
  22. End Sub
  23. -------------------------------------------------------------------------
  24. Sub Macro2()
  25.     Dim Cell As Range
  26.     Dim broj As Double
  27.  
  28.     Cells.Find(What:="201", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
  29.         xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
  30.         , SearchFormat:=False).Activate
  31.     For Each Cell In Cells
  32.         MsgBox Cells.
  33.        
  34.        
  35.         Range(ActiveCell.Offset(0, 1), ActiveCell.Offset(0, 1)).Select
  36.         If ActiveCell.Value = 0 Then
  37.             MsgBox "GOTOVO!"
  38.             Exit For
  39.         End If
  40.         ActiveCell.Value = 0
  41.         If ActiveCell.Value <> 0 Then
  42.             Cells.FindNext(After:=ActiveCell).Activate
  43.         End If
  44.     Next Cell
  45. End Sub
  46. ----------------------------------------------------------------------------------
  47. PRETVARANJE SVIH 201 cifri u 0
  48. ---
  49. Sub Macro1()
  50.     Dim Cell As Range
  51.     Dim broj As Double
  52.  
  53.     Cells.Find(What:="201", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
  54.         xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
  55.         , SearchFormat:=False).Activate
  56.     For Each Cell In Cells
  57.         Range(ActiveCell.Offset(0, 1), ActiveCell.Offset(0, 1)).Select
  58.         If ActiveCell.Value = 0 Then
  59.             MsgBox "GOTOVO!"
  60.             Exit For
  61.         Else
  62.         ActiveCell.Value = 0
  63.         Cells.FindNext(After:=ActiveCell).Activate
  64.         End If
  65.     Next Cell
  66. End Sub
  67. ----------------------------------------------------------------------------------
  68. PRETVARANJE SVIH 201 cifri u iz 0 u adekvatne
  69. ---
  70. Sub Macro1()
  71.     Dim cell As Range
  72.     Dim Cifra As Integer
  73.    
  74.     Cells.Find(What:="201", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
  75.         xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
  76.         , SearchFormat:=False).Activate
  77.     For Each cell In Cells
  78.         Range(ActiveCell.Offset(0, 1), ActiveCell.Offset(0, 1)).Select
  79.         If ActiveCell.Value = 0 Then
  80.             ActiveCell.Formula = "=ROUND(" + Range(ActiveCell.Offset(-1, 0), ActiveCell.Offset(-1, 0)).AddressLocal() + "*0.115, 0)"
  81.             ActiveCell.Value = ActiveCell.Value
  82.             Range(ActiveCell.Offset(0, -1), ActiveCell.Offset(0, -1)).Select
  83.             Cells.FindNext(After:=ActiveCell).Activate
  84.         Else
  85.             MsgBox "GOTOVO!"
  86.             Exit For
  87.         End If
  88.     Next cell
  89. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement