How to Convert Heights from Centimeters to Feet and Inches Format

I have a Column that stores heights in centimeters, and I’d like to create another field that converts those heights into feet and inches, formatted as #’#" (e.g., 5’9").

The conversion from centimeters to inches is straightforward (divide by 2.54), and I can round to the nearest inch. However, I’m stuck on how to format the result to separate the feet and inches properly.

For instance, 175 cm converts to 69 inches, which should display as 5’9". How can I achieve this formatting in Stackby? Any help would be greatly appreciated!

Hey Avidlearner,
As you know to convert Cm into inches you simply divide by 2.54

Step 1: Convert cm to inches

Divide the value in centimeters by 2.54 to get the height in inches.

Inches = {Height in cm} / 2.54

Step 2: Convert inches to feet

Divide the total inches by 12 to calculate the number of feet. Use the FLOOR function to extract the whole number (feet).

Feet = FLOOR(Inches / 12)

Step 3: Calculate the remaining inches

To get the extra inches, subtract the number of feet (in inches) from the total inches:

Extra Inches = ROUND(Inches - (Feet * 12), 0)

Step 4: Format the result

Use the CONCAT formula to combine feet and inches into the desired format (#’#"):

CONCAT(Feet, "'", {Extra Inches}, '"')