Processi in Microsoft 365 per configurare app Office, riscattare i codici Product Key e attivare le licenze.
Per ora ho risolto alla meno peggio, mi sono riportato le formule in codice, poi ne copio/incollo il risultato sulle stesse celle :-)
Ho utilizzato una userForm per scelta Anno e Mese che poi vado a caricare in celle e utilizzo nelle formule.
'<----------
Private Sub CommandButton1_Click()
Range("P1").Value = TextBox1.Value
Range("Q1").Value = ComboBox1.Value
Unload Me
Application.ScreenUpdating = False
ActiveSheet.Unprotect
Range("A2").Select
ActiveCell.FormulaR1C1 = "=DATE(R1C16,R1C18,1)"
Range("A3").Select
ActiveCell.FormulaR1C1 = _
"=IF(R[-1]C="""","""",IF(MONTH(R[-1]C+1)<>R1C18,"""",R[-1]C+1))"
Range("A3").Select
Selection.AutoFill Destination:=Range("A3:A32"), Type:=xlFillDefault
Range("A3:A32").Select
Range("B2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-1]="""","""",VLOOKUP(RC1,STORICO!R3C1:R10000C33,14,FALSE))"
Range("C2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC1="""","""",VLOOKUP(RC1,STORICO!R3C1:R10000C33,15,FALSE))"
Range("D2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC1="""","""",VLOOKUP(RC1,STORICO!R3C1:R10000C33,16,FALSE))"
Range("E2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC1="""","""",VLOOKUP(RC1,STORICO!R3C1:R10000C33,17,FALSE))"
Range("F2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-5]="""","""",IF(ISERROR((RC[-1]-RC[-2])+(RC[-3]-RC[-4])),"""",(RC[-1]-RC[-2])+(RC[-3]-RC[-4])))"
Range("B2:F2").Select
Selection.AutoFill Destination:=Range("B2:F32"), Type:=xlFillDefault
Range("B2:F32").Select
Range("A2:F32").Select
Selection.Copy
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("L1").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("G2").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:=False
End Sub
'<----------
Il problema è che probabilmente non gira su versioni diverse da excel 2007, che ho utilizzato e al momento non ho modo di testare.
Ciao
Antonio