• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

GRISCHKE SOLUTIONS

Website and Software Development | IT | Office

  • Home
  • About
  • Services
    • Web Development & Hosting
    • IT, Networking and Cloud Solutions
    • Email and Office Solutions
    • Design Services
    • Quality Management
    • Document Management
    • Performance Dashboard
    • HR Management
    • Payroll Solutions
    • IT Support
    • GDPR
  • Blog
    • Delete Deleted Users in Office 365 – Using Power Apps App
    • Start Jaguar Engine Remotely with Siri
    • Backup and restore IONOS DNS records using Power Automate, API, including SOA record
    • How to build an Email Parser in Microsoft Flow (Extract text from email body)
    • Windows 10 1803 new OEM (or ESP) Partition
    • Unprotect Excel Worksheets without Password
    • Data protection law is changing – you need to act now
    • Calculate Ratio Between Two Numbers
    • Charts in SharePoint
    • Microsoft SharePoint Services – What you need to know
    • Hide Featured Images in Genesis using 3 lines of code
    • Workflow loop through SharePoint list
  • Products
    • Basket
  • Enquiry

Calculate Ratio Between Two Numbers

17th September 2017 By Maciek Grischke Leave a Comment

Calculate Ratio with GCD

In this example, there is a list of screen dimensions, with the first width — 400 — in cell B4 and the first height — 300 –in cell C4.

To calculate the ratio for each screen, the formula will use the GCD function, which returns the Greatest Common Divisor, for two or more numbers.

NOTE: In Excel 2003 and earlier, the Analysis Toolpak must be installed, to use the GCD function.

Test the GCD Function

To see the largest number which will divide equally into the numbers in B4 and C4, enter this formula in cell D4:

=GCD(B4,C4)

The result is 100.

Create the Ratio Formula

To calculate the ratio, the width will be divided by the GCD and the height will be divided by the GCD. A colon will be placed between those two numbers.

To see the ratio, enter this formula in cell E4:

=B4/GCD(B4,C4)&”:”&C4/GCD(B4,C4)

The result is 4:3 — the ratio for those screen dimensions.go to top

Ratio With TEXT and SUBSTITUTE

Another way to calculate ratio is with the TEXT and SUBSTITUTE functions — these functions work in all versions of Excel, without the Analysis Tookpak having to be installed.

In this example, there is a list of screen dimensions, with the first width — 400 — in cell B4 and the first height — 300 –in cell C4.

To calculate the ratio for each screen, the formula will divide the width by the height, and format the result as a fraction. Then, the slash will be replaced with a colon, to create the ratio.

Test the TEXT Function

To see the result as a fraction, enter this formula in cell D4:

=TEXT(B4/C4,”#/######”)

The result is 4/3.

Create the Ratio Formula

To calculate the ratio, the width will be divided by the height, and formatted as a fraction. A colon will replace the slash.

To see the ratio, enter this formula in cell E4:

=SUBSTITUTE(TEXT(B4/C4,”#/######”),”/”,”:”)

The result is 4:3 — the ratio for those screen dimensions.

Filed Under: Tutorials

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

  • Delete Deleted Users in Office 365 – Using Power Apps App
    By Maciek Grischke
    13th March 2023
  • Lock and Unlock your Jaguar with Siri
    By Maciek Grischke
    21st January 2023
  • Start Jaguar Engine Remotely with Siri
    By Maciek Grischke
    6th December 2022
  • Travel Mileage Claim Form in Power Apps using TomTom API
    By Maciek Grischke
    24th September 2022
  • Backup and restore IONOS DNS records using Power Automate, API, including SOA record
    By Maciek Grischke
    14th August 2022
  • Home
  • About
  • Services
  • Blog
  • Products
  • Enquiry

 

Designed in-house by GRISCHKE SOLUTIONS © 2022 · Log in

Address

GRISCHKE SOLUTIONS
8 Sycamore Cottages
High Street
Pembury
TN2 4PJ

Site Info

Privacy Statement

Cookies Policy