User Tools

Site Tools


microsoft_excel:macros:formulae:change_formulae

Microsoft Excel - Macros - Formulae - Change Formulae

' Change for formula in column E to add 1 to the date.  This should make dates that are the last day of the month now reflect
' the 1st of the following month.
 
.Range("E" & i).Formula = "=TEXT(TEXT(MID(F" & i & ",FIND("" "",F" & i & ")+1,FIND("","",F" & i & ")-FIND("" "",F" & i & ")-1)&"" ""&LEFT(F" & i & ",FIND("" "",F" & i & ")-1)&"" ""&RIGHT(F" & i & ",4),""dd/mm/yyyy"")+1,""dd/mm/yyyy"")"
 
.Range("A" & i & ":C" & i).Formula = .Range("A2:C2").FormulaR1C1
.Range("A" & i & ":C" & i).Calculate
 
.Range("K" & i & ":N" & i).Formula = .Range("K2:N2").FormulaR1C1
.Range("K" & i & ":N" & i).Calculate
 
.Range("AI" & i & ":AM" & i).Formula = .Range("AI2:AM2").FormulaR1C1
.Range("AI" & i & ":AM" & i).Calculate
 
.Range("AR" & i & ":AT" & i).Formula = .Range("AR2:AT2").FormulaR1C1
.Range("AR" & i & ":AT" & i).Calculate
microsoft_excel/macros/formulae/change_formulae.txt · Last modified: 2021/08/04 16:17 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki