
Sub Macro1()
'
' Macro1 Macro
'
'
ActiveCell.FormulaR1C1 = "=SUM(RC[-1]/100)"
ActiveCell.Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:A20")
ActiveCell.Range("A1:A20").Select
ActiveCell.Offset(20, 0).Range("A1").Select
End Sub
|
Sub somma()
'
' somma Macro
'
'
ActiveCell.Select
ActiveCell.FormulaR1C1 = "=RC[-1]/100"
ActiveCell.Select
Selection.Copy
ActiveCell.Offset(0, -1).Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 1).Range("A1").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
End Sub
|
Option Explicit
Sub somma()
Dim ws As Worksheet
Dim x As Long
Set ws = ThisWorkbook.ActiveSheet
With ws
x = .Range("A" & .Rows.Count).End(xlUp).Row
.Range(.Cells(1, 2), .Cells(x, 2)).FormulaR1C1 = "=RC[-1]/100"
End With
Set ws = Nothing
End Sub |
Sub copia_formula()
Range("B1:B" & [counta(A:A)]).FormulaLocal = "=A1/100"
End Sub |
Sub copia_formula()
With Range("B1:B" & [counta(A:A)])
.FormulaLocal = "=A1/100"
.Value = .Value
End With
Columns(1).Delete
End Sub |
Sub copia_formula()
Dim cella As Range
For Each cella In Range("A1:A" & [counta(A:A)])
With cella
.Value = .Value / 100
End With
Next cella
End Sub |
Sub TestForum()
Dim x As String
With Range("A1:A" & [counta(A:A)])
x = .Address
.Offset(, 0) = Evaluate("if(isnumber(" & x & ")," & x & " /100," & x & ")")
End With
End Sub |
Sub modifica_tabella()
Range("M1:M" & [counta(A:A)]).FormulaLocal = "=CONCATENA(STRINGA.ESTRAI(E1;1;6);20;STRINGA.ESTRAI(E1;7;2))"
Range("N1:N" & [counta(A:A)]).FormulaLocal = "=C1/100"
Range("O1:O" & [counta(A:A)]).FormulaLocal = "=L1/100"
End Sub |
Sub ermetica()
Dim x As String
Dim p As String
With Range("C1:C" & [counta(A:A)])
x = .Address
.Offset(, 0) = Evaluate("if(isnumber(" & x & ")," & x & " /100," & x & ")")
End With
With Range("L1:L" & [counta(A:A)])
p = .Address
.Offset(, 0) = Evaluate("if(isnumber(" & p & ")," & p & " /100," & p & ")")
End With
Range("M1:M" & [counta(A:A)]).FormulaLocal = "=CONCATENA(STRINGA.ESTRAI(E1;1;6);20;STRINGA.ESTRAI(E1;7;2))"
End Sub
|
Sub ermetica()
Dim x As String
Dim p As String
Dim q As String
Dim LastRow As Long
LastRow = [counta(A:A)]
With Range("C1:C" & LastRow)
x = .Address
.Offset(, 0) = Evaluate("(" & x & ")/100")
End With
With Range("L1:L" & LastRow)
p = .Address
.Offset(, 0) = Evaluate("(" & p & ")/100")
End With
With Range("E1:E" & LastRow)
q = .Address
.Offset(, 0) = Evaluate("CONCATENATE(MID( " & q & " ,1,6),20,MID( " & q & " ,7,2))")
End With
End Sub |
Sub ermetica()
Dim x As String
Dim p As String
Dim LastRow As Long
LastRow = [counta(A:A)]
With Range("C1:C" & LastRow)
x = .Address
.Offset(, 0) = Evaluate("(" & x & ")/100")
End With
With Range("L1:L" & LastRow)
p = .Address
.Offset(, 0) = Evaluate("(" & p & ")/100")
End With
'Utilizza il metodo TextToColumns disponibile in: Menu Dati
With Range("E1:E" & LastRow)
.TextToColumns Destination:=.Offset(, 0), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 4), TrailingMinusNumbers:=True
End With
End Sub |
