DEC2HEX

Converts a decimal number to signed hexadecimal format. Learn more

Video field
Engineering

DEC2HEX is a function commonly used in Google Sheets to convert a decimal number to its corresponding hexadecimal (base 16) representation.

The DEC2HEX function takes one required argument, the decimal number that you want to convert to hexadecimal, and an optional second argument, the number of significant digits to display in the resulting hexadecimal number.

For example, if you want to convert the decimal number 255 to hexadecimal, you would use the formula =DEC2HEX(255), which would return the hexadecimal value FF (because 255 in decimal is equivalent to FF in hexadecimal notation).

If you want to limit the number of significant digits in the resulting hexadecimal value, you can include a second argument in the function. For example, the formula =DEC2HEX(255, 2) would return the value FF, while the formula =DEC2HEX(255, 4) would return the value 00FF (because it includes four digits).

Want even more from Google Sheets?


With Softr, you can turn your spreadsheets into powerful web apps.You can give advanced roles and permissions to each user, build advanced logic and automation flows, customize the design to your needs, and much more.


Softr also offers a growing library of templates for internal tools, client portals, community hubs, and more. The templates come with a Google Sheet or an Airtable base that you can use to store and manage your data easily.


Try Softr now and build your custom web apps in 10 minutes no code required!