|
Login
  • Page:
  • 1

TOPIC: macro per trascinare formula

macro per trascinare formula 8 years 10 months ago #7105

  • emi
  • emi's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
  • Karma: 0
ciao a tutti!

(premetto che non so creare macro)
ho fatto una macro col registratore e mi serve trascinare la formula fino all ultima riga con dati come devo modificare la macro?

grazie mille

Sub DATE_ADJ()
'
' DATE_ADJ Macro
'

'
Columns("N:N").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("O:O").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("P:P").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("N5").Select
ActiveWindow.SmallScroll Down:=-15
ActiveCell.FormulaR1C1 = "DATA GIUSTA"
Range("O5").Select
ActiveCell.FormulaR1C1 = "MESE"
Range("P5").Select
ActiveCell.FormulaR1C1 = "ANNO"
Range("N6").Select
ActiveWindow.SmallScroll Down:=-18
ActiveCell.FormulaR1C1 = _
"=IF(RC[-1]="""","""",IF(ISTEXT(RC[-1]),RC[-1],TEXT(RC[-1],""MM/GG/AA"")))"
Range("N6").Select
Selection.AutoFill Destination:=Range("N6:N44"), Type:=xlFillDefault
Range("N6:N44").Select
End Sub
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.754 seconds