# Grams to ounces and ounces to grams converter

In this Excel tutorial lesson, you will learn how to convert grams to ounces and ounces to grams using the Microsoft Excel application.

Toggle

## Convert using simple multiplication

28.35 is the key number here. To convert grams to ounces, you need to just divide by 28.35. Similarly, to convert ounces to grams, you need to multiply by 28.35.

## Conversion using CONVERT Excel function

The CONVERT function automatically converts the value based on the specified input and output units, which eliminates the need for a separate conversion factor or formula.

This method is more efficient and less prone to errors, as the conversion is handled by the built-in function in Excel.

=CONVERT(cell,”unit1″,”unit2″)

## Convert using VBA code

This VBA code will ask you how many grams you want to convert to ounces:

Function ConvertGramsToOunces(grams As Double) As Double
ConvertGramsToOunces = grams * 0.03527396
End Function
Sub ConvertGramsToOuncesMain()
Dim grams As Double
Dim ounces As Double
grams = InputBox("Enter the number
of grams to convert to ounces:")
If IsNumeric(grams) Then
ounces = ConvertGramsToOunces(grams)
MsgBox grams & " grams is equal to " & ounces & " ounces",
vbInformation, "Grams to Ounces Conversion"
Else
a valid number.", vbExclamation, "Error"
End If
End Sub

The custom functions in the Visual Basic module handle the conversion by applying the appropriate formula, which makes the conversion process easier and more efficient.

This method also allows you to modify the conversion formulas if needed, by simply editing the code in the module.

## Convert grams to pounds and ounces

1 kilogram is equal to 1000 grams, making it easy to calculate. One pound is 16 ounces, making it more difficult to calculate. Luckily, there is an Excel formula which converts grams to pounds and ounces.

=TRUNC(A1/28.35/16)&” lb “&ROUND(MOD(A1/28.35,16),0)&” oz”

It will convert 1000 grams to 2 lb 3 oz.

You can easily and accurately perform conversions between grams and ounces, as well as between grams and a combination of pounds and ounces in Excel.