Range("A1").Value = Int((1000 - 1 + 1) * Rnd + 1)
With Range("A1").Validation.Delete.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _ Operator:=xlBetween, Formula1:="Sim,Não" End With
Dim lastRow As Long lastRow = Cells(Rows.Count, "A").End(xlUp).Row
Dim polegadas As Double Dim cm As Double polegadas = 10 cm = polegadas * 2.54
Range("B1").Value = Range("A1").Value
ActiveSheet.Shapes.AddChart2(251, xlColumnClustered).Select ActiveChart.SetSourceData Source:=Range("A1:B5") ActiveChart.FullSeriesCollection(1).XValues = Range("A1:A5")
Range("A1:A10").Sort key1:=Range("A1"), order1:=xlAscending, Header:=xlNo
Dim media As Double media = WorksheetFunction.Average(Range("A1:A10"))
Range("A1").Interior.Color = vbRed
Range("A1").Value = "Olá mundo"