IF function is not working correctly.

The INSTRUCTION is =IF($D6=1,$E6100$G6-$H6,0)
In first cell it works correctly and returns numeric value. When copied to adjacent cells it only returns True or False instead of numeric value.

Also, If the condition is D6=a number, eg 1 the above happens . If D5= a letter, eg b or s it only returns #NAME?
How do I fix this?

Can you please fix your example formula expression code and enclose it in back ticks ` (one before and one after; or select and press Ctrl+K) so it doesn’t get reformatted and accidental HTML portions aren’t stripped? Thanks.

The INSTRUCTION is’ =IF($D6=1,$E6100$G6-$H6,0)’ In first cell it works correctly and returns numeric value. When copied to adjacent cells it only returns True or False instead of numeric value.

Also, If the condition is D6=a number, eg 1 the above happens . If D6= a letter, eg b or s it only returns #NAME? How do I fix this?

Hope that this is what you need.

No, that was not in back ticks but in normal apostrophes… anyway, figured out from viewing your source, it’s =IF($D6=1,$E6*100*$G6-$H6,0)

The single * asterisks here result in italic formatting (double asterisks for bold). That is prevented by enclosing short code in back ticks.

If you write D6=b then b has to be a name (named range, expression, database range, …), if you want to compare against the literal string then enclose it in double quotes, so D6="b"

If copying to adjacent displays a logical value TRUE or FALSE then the cell probably is formatted to Boolean, where 0 displays as FALSE and any other numeric value as TRUE. Apply for example the General number format.