Hello ,
I'm trying to add codes to lines in VBA to make my sheet cleaner looking and less likely to be messed with. I'm am very new to this.
I know that my range U4 has " in the formula and is causing an issue. What is the best way to solve it?
I'm trying to add codes to lines in VBA to make my sheet cleaner looking and less likely to be messed with. I'm am very new to this.
I know that my range U4 has " in the formula and is causing an issue. What is the best way to solve it?
Code:
Sub NewDashboardLine()
'
' NewDashboardLine Macro
' Adds a new line to line 4 in Dashboard
'
' Creates new line
Rows("4:4").Select
Selection.Insert Shift:=xlDown
' Clears contents
Rows("4:4").Select
Selection.ClearContents
Selection.ClearFormats
'add formulas to new line
Range("f3") = "Sale in Progress" 'adds sale status
Range("M4") = "=HYPERLINK([@[File Address]])"
Range("U4") = " =IF(AI1="","Not Approved Yet",AI1) "
Range("Y4") = "=CONCATENATE(UPPER(W1),X1)"
End Sub