I have a macro that adds a very long formula to one of the cells.
Is there a way to break up this formula in the VBA editor to make it easier to view and edit.
Sheet3.Select
Dim lastrow As Long
Range("D2").Formula = "=SUM(IFERROR(VLOOKUP(E2,Scores[[Values]:[Score]],2,FALSE),0)+IFERROR(VLOOKUP(H2,Scores[[Values]:[Score]],2,FALSE),0)+IFERROR(VLOOKUP(I2,Scores[[Values]:[Score]],2,FALSE),0)+IFERROR(VLOOKUP(J2,Scores[[Values]:[Score]],2,FALSE),0)+IFERROR(VLOOKUP(K2,Scores[[Values]:[Score]],2,FALSE),0)+IFERROR(VLOOKUP(L2,Scores[[Values]:[Score]],2,FALSE),0)+IFERROR(VLOOKUP(M2,Scores[[Values]:[Score]],2,FALSE),0))"
Range("D2").AutoFill Destination:=Range("D2:D" & lastrow), Type:=xlFillDefault
I'm trying to get it to look more like this:
A space and underscore didn't work.
I could add a carriage return but that just adds it to the formula, I'm trying to make it easier to view inside the VBA editor.
Might some kind of CONCAT do it?