Hi
 
I wondered if someone could help me work out why this function doesn't work please? Basically, I want to be able to select one/more cells, and run a macro that converts the formula so that errors appear as zeros (see below).
 
Any help would be gratefully received!
 
Thanks
Paul
 
 
	
	
	
		
				
			I wondered if someone could help me work out why this function doesn't work please? Basically, I want to be able to select one/more cells, and run a macro that converts the formula so that errors appear as zeros (see below).
Any help would be gratefully received!
Thanks
Paul
		Code:
	
	Sub ErrorToIf()
'
	OldContents = ActiveCell.Formula
	OldContents = Right(OldContents, Len(OldContents) - 1)
	ActiveCell.Formula = "=if(iserror(" & OldContents  & ",0," & OldContents & "))"
	
	
End Sub