There are 3 views in Excel: Normal View, Page Break Preview, and Page Layout View. You can use the ruler only in Page Layout View. Please see here why the rule gray out, or follow the steps below to set the ruler unit to inch.
Step 1: Click the "File" Tab from the ribbon;
Step 2: Click "Options" from the left navigation menu;
Step 3: Click "Advanced" from the left navigation menu in the dialog box;
Step 4: Select "Inches" from "Ruler Unit" under the section of "Display";
Step 5: Click "OK" at the bottom to apply the changes.