Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DAN 2
- Sub Macro1()
- '
- ' Macro2 Macro
- Dim cell As Range
- Cells.Find(What:="201", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
- xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
- , SearchFormat:=False).Activate
- For Each cell In Cells
- Range(ActiveCell.Offset(0, 1), ActiveCell.Offset(0, 1)).Select
- If ActiveCell.HasFormula = True Then
- MsgBox "GOTOVO!"
- Exit For
- End If
- ActiveCell.Formula = "=ROUND(" + Range(ActiveCell.Offset(-1, 0), ActiveCell.Offset(-1, 0)).AddressLocal() + "*0.115, 0)"
- Range(ActiveCell.Offset(0, -1), ActiveCell.Offset(0, -1)).Select
- If ActiveCell.HasFormula = False Then
- Cells.FindNext(After:=ActiveCell).Activate
- End If
- Next cell
- End Sub
- -------------------------------------------------------------------------
- Sub Macro2()
- Dim Cell As Range
- Dim broj As Double
- Cells.Find(What:="201", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
- xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
- , SearchFormat:=False).Activate
- For Each Cell In Cells
- MsgBox Cells.
- Range(ActiveCell.Offset(0, 1), ActiveCell.Offset(0, 1)).Select
- If ActiveCell.Value = 0 Then
- MsgBox "GOTOVO!"
- Exit For
- End If
- ActiveCell.Value = 0
- If ActiveCell.Value <> 0 Then
- Cells.FindNext(After:=ActiveCell).Activate
- End If
- Next Cell
- End Sub
- ----------------------------------------------------------------------------------
- PRETVARANJE SVIH 201 cifri u 0
- ---
- Sub Macro1()
- Dim Cell As Range
- Dim broj As Double
- Cells.Find(What:="201", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
- xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
- , SearchFormat:=False).Activate
- For Each Cell In Cells
- Range(ActiveCell.Offset(0, 1), ActiveCell.Offset(0, 1)).Select
- If ActiveCell.Value = 0 Then
- MsgBox "GOTOVO!"
- Exit For
- Else
- ActiveCell.Value = 0
- Cells.FindNext(After:=ActiveCell).Activate
- End If
- Next Cell
- End Sub
- ----------------------------------------------------------------------------------
- PRETVARANJE SVIH 201 cifri u iz 0 u adekvatne
- ---
- Sub Macro1()
- Dim cell As Range
- Dim Cifra As Integer
- Cells.Find(What:="201", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
- xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
- , SearchFormat:=False).Activate
- For Each cell In Cells
- Range(ActiveCell.Offset(0, 1), ActiveCell.Offset(0, 1)).Select
- If ActiveCell.Value = 0 Then
- ActiveCell.Formula = "=ROUND(" + Range(ActiveCell.Offset(-1, 0), ActiveCell.Offset(-1, 0)).AddressLocal() + "*0.115, 0)"
- ActiveCell.Value = ActiveCell.Value
- Range(ActiveCell.Offset(0, -1), ActiveCell.Offset(0, -1)).Select
- Cells.FindNext(After:=ActiveCell).Activate
- Else
- MsgBox "GOTOVO!"
- Exit For
- End If
- Next cell
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement