User Tools

Site Tools


microsoft_excel:macros:change_formulae

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

microsoft_excel:macros:change_formulae [2021/08/04 14:01] – created petermicrosoft_excel:macros:change_formulae [2021/08/04 15:17] (current) – removed peter
Line 1: Line 1:
-====== Microsoft Excel - Macros - Change formulae ====== 
- 
-<code excel> 
-' 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 
-</code> 
  
microsoft_excel/macros/change_formulae.1628085696.txt.gz · Last modified: 2021/08/04 14:01 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki