|When you enclose the 0 (zero) in quotes, Excel thinks you mean the text string 0, not the value 0.|
Remove the quotes and you should be fine.
= IF(AF37=0," ",AF37)
P.S. Do you really want a space " " or do you want an empty cell ""?
Excel will treat a " " differently than a "", so it depends on what you doing with H30 when deciding which to use.