# If I sum a integer with a fraction it says #VALUE!

If I hit enter I would expect that in B37 will be 2+1/2 =5/2, but instead it says: `#VALUE!`

Why? How could I fix?

Your fraction has been converted to a text character.

Please see question “Could not insert Fractions 1/2 1/4” Could not insert Fractions 1/2 1/4 Cheers, Al

If you want to enter a fraction into a cell for calculations, you can enter it as a formula. Your 1/2 would then look like `=1/2` and no AutoCorrect (better: AutoSpoil - in Calc at least) will interfere.

The default formatting will then show you the value as a decimal number with or without rounding, but if you want to see the fraction, and the celll is expected to always contain fractions of (say) 2 digits at maximum in the denominator, you can set a fractional format string like `# ?/??` for the cell under `>Format Cells...>Numbers`.

Be sure to understand, that calculations never will regard special rules for fractions in Calc.

[Editing]
A simple example for fractional formatting:

Thanks for answer! All you wrote is almost perfect to me, the only thing that I’d like to change is that for example in the file you posted, the fraction `18/7` is shown as `2 4/7`… is there a way to show it like `18/7` ?

`?/???` e.g. In `# ?/??` (e.g.) the `#` allows for a split off integer part `0` in the same place would enforce one, even if zero.
Since you (OQ) are obviusly interested in fractional formats, and I was the one who hinted you to, I should also mention that fractional formats are limited to cases where the denominator and the numerator as they are obtained by the appropriate algorithm both can safely be assured to be integer numbers with significant digits. Since the actual value getting formatted always is standardized disregarding aspects of this kind, that’s not trivial. Generally the mathematics behind fractional formatting is more subtle than with other kinds of number formatting.

Hello,

your fraction in cell `B38` isn’t a numerical value but (turned to by an AutoCorrect Option) text (it is right aligned). Enter the fraction as `=1/2` (value will turn to `0.5` and cell `B37` (`=B38+B39`) will turn to the correct value.

Hope that helps.

thanks for answer. Writing =1/2 it works, but I’d like to see the fraction instead of 0.5

but I’d like to see the fraction instead of 0.5

This is a matter of formatting after input (see @Lupp’s answer). Never mix input (and what gets really stored) and what you see (representation of the real data). And from the question I take the assumption that you are pretty new to Calc and hence my (unsolicited; sorry if I’m wrong with my assumption) advice is: Leave off for a while all the design stuff and visual aspects to create appealing spreadsheets until you are familiar with data types, data input and data representation.