Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Numbers "format cells" to show grams & kilograms

I use this formula in excel to format cells. I'd like to know how to do the same in numbers as I prefer numbers over excel.


Custom format cells in excel [<1000]#,##0.00"g";0.00,"kg"



This basically converts anything over 1000g in to 1kg for me.


How do I go about doing this in numbers

Posted on Apr 9, 2020 4:22 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 9, 2020 4:29 PM

Select cell(s):

Then open the cell formatter and choose "Create Custom Format…"


then set up to scale like this:


you can drag the scale tag (the "K" from the lower section into the field). the hover the cursor over the tag in the field and click the down-facing contextual menu to select the scale value

4 replies

Apr 10, 2020 12:33 AM in response to z_lex

Hi z_lex,

A 'custom format' only formats how a number is displayed.

It does not convert the number to an equivalent value using another unit.



Column A shows the raw numbers representing the number of grams mass of a variety of samples.


Column B shows the same numbers formatted using the custom format suggested above.


B4 shows the mass of approximately half a cup (8 tablespoons) of water.

B5 shows a mass between that of a Smart ForTwo car and a 2018 Mini Cooper.


Numbers doesn't support a formula that both converts and formats a metric value to appropriate units. In is possible to use a formula to differentiate between numbers containing a fractional part (not .00 though) and those with no decimal part, then append the appropriate symbol. The result, though is a text value, which may not be compatible with math to be down with that value.


=D2&IF(D2=INT(D2),"g","kg")

The formula shown is in E2, and filled down to E9. Text alignment has been set to 'align right.'


Regards,

Barry

Numbers "format cells" to show grams & kilograms

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.