I am inserting some formulas into a spreadsheet at runtime and have run into an issue with formulas containing quote marks.
When setting the .Formula value in a cell, eg.
ex.Worksheets["ALD"].Cells[3, 1].Formula = " =MAXIFS(PSD!D9:D27,PSD!D9:D27,\"<50\")";
When the Excel file is opened the formula reads as
Is there a simple way of handling this that I am overlooking?