PDA

View Full Version : MS XLS divide IF function



NavyDiver
24th August 2023, 08:55 AM
I am trying to divide a cell IF GST is applicable to the transaction. I know I could buy or use accounting software.

My database bias is admitted.

=IF(E7=”Y”,B20/11,0)

Code is giving me a name
E7 is simple [B]Yes/No field and is 'Y'
B20 in this case is 7451 number field

I thought the B20 /11 would give me 677.30. It gives me a 'NAME' result.

I have tried =sum(IF((E7=”Y”,B20/11,0)) and sumIF(E7=”Y”,B20/11,0)

Checked column B is formatted as Number as is Colum C where the formula and result is wanted.

PS- I sorted by Colum E and copied the simple formula to Divide by 11 as I am late as usual.

Graeme
24th August 2023, 09:16 AM
I can only get =IF to work correctly when the logical test is numeric rather than alpha but I haven't been able to trigger a name error.

peterjj
25th August 2023, 07:49 AM
Try retyping in the double quotes, they look wrong, maybe copy pasted from somewhere with different character set(?).
Should be "Y" not ”Y”

NavyDiver
5th September 2023, 04:22 PM
Fixed it[thumbsupbig]

It is =IF(D47="yy",B47/11,0) worked for several thousand transactions [thumbsupbig]

Graeme
5th September 2023, 06:11 PM
What is in D47?