toNumberNumber must be at the start of the Frequency options.
dateAdd(prop("Last Completed"), toNumber(prop("Frequency")), "days")
replaceAllNumber can be anywhere in Frequency option.
dateAdd(prop("Last Completed"), toNumber(replaceAll(prop("Frequency"), "[^0-9.]", "")), "days")
ifFormula would need to be updated if you added a new Frequency option.
if(prop("Frequency") == "Weekly", dateAdd(prop("Last Completed"), 1, "weeks"), if(prop("Frequency") == "Fortnightly", dateAdd(prop("Last Completed"), 2, "weeks"), if(prop("Frequency") == "Monthly", dateAdd(prop("Last Completed"), 1, "months"), fromTimestamp(toNumber("")))))