Excel IF formula

%3CLINGO-SUB%20id%3D%22lingo-sub-1871655%22%20slang%3D%22en-US%22%3EExcel%20IF%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1871655%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I%20need%20a%20hand%20with%20an%20if%20statement%20that%20is%20not%20working.%3C%2FP%3E%3CP%3EIn%20cell%20H9%20I%20would%20like%20to%20do%20the%20following%3A%3C%2FP%3E%3CP%3E%3D%3CSPAN%20class%3D%22Apple-converted-space%22%3E%26nbsp%3B%20%3C%2FSPAN%3EIf%3CSPAN%20class%3D%22Apple-converted-space%22%3E%26nbsp%3B%20cell%26nbsp%3B%3C%2FSPAN%3EH4%20is%20blank%20then%200%20else%20perform%20the%20percent%20increase%20calculation%20%26nbsp%3B(G4-C4)%2FC4%3C%2FP%3E%3CP%3EThis%20is%20what%20I%20have%3A%3C%2FP%3E%3CP%3E%3DIF(H4%3D%E2%80%9C%E2%80%9D%2C0%2C(G4-C4)%2FC4)%3C%2FP%3E%3CP%3EI%20get%20a%20%23NAME%3F%20error%3C%2FP%3E%3CP%3EThanks%2C%20Scott%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1871655%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1871723%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20IF%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1871723%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F863980%22%20target%3D%22_blank%22%3E%40scottB400%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20MUST%20use%20straight%20quotes%20%22%22%20instead%20of%20curly%20quotes%20%E2%80%9C%E2%80%9D%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi, I need a hand with an if statement that is not working.

In cell H9 I would like to do the following:

=  If  cell H4 is blank then 0 else perform the percent increase calculation  (G4-C4)/C4

This is what I have:

=IF(H4=“”,0,(G4-C4)/C4)

I get a #NAME? error

Thanks, Scott

3 Replies

@scottB400 

You MUST use straight quotes "" instead of curly quotes “”

@Hans Vogelaar Hi, any thoughts on how to use straight quotes? Auto correct on the Mac does not offer a way to change quote marks. Also, I just replaced the quotes by simply retyping them. I went from a #NAMES? error to a zero in the cell. But it does not change when I enter data in h9.

@scottB400 Ok, just got straight quotes. All is working, thanks, Scott