Thanks MDeLeon but the codes you've provided are still throwing following exceptions
var range1 = ws.NamedRange("Bad");
ex = {"The given key was not present in the dictionary."}
var contains1 = ws.NamedRanges.Contains("Bad");
ex = {"Index was outside the bounds of the array."}
At the moment I've done a work around by getting all NamedRanges in a string collection then doing a Contains
var range1 = ws.NamedRange("Bad");
ex = {"The given key was not present in the dictionary."}
var contains1 = ws.NamedRanges.Contains("Bad");
ex = {"Index was outside the bounds of the array."}
At the moment I've done a work around by getting all NamedRanges in a string collection then doing a Contains