Function Problems

How to Calculate Bike and Walking Mileage in Excel (Formulas)

Phi Hung VoPhi Hung Vo Nov 3, 2026 870 views

Question details

The user needs to sum mileage for different fitness activities independently, particularly when entries are recorded with prefixes like 'B' for biking and 'W' for walking (e.g., B22.05, W5.87).

How to Calculate Bike and Walking Mileage in Excel
Product
Excel
Device & OS
not provided
Scenario
Tracking multiple fitness activities in a single spreadsheet and attempting to automatically calculate the total mileage per specific activity.
Observed behavior
Currently, numbers and text are mixed in single cells, preventing standard SUM functions from working correctly. The data requires reorganization or specific formulas to isolate and sum the values based on their category.
Before you start

Before applying these formulas, decide whether it's easier to adjust your current table layout to separate text and numbers, as a structured layout prevents most calculation errors.

Solution 1Recommended

Use a Structured Layout with SUMIFS (Recommended)

Reorganizing your data to have separate category labels is the most reliable and scalable way to calculate totals for specific activities.

Mixing text (like 'B' or 'W') with numbers in the same cell prevents Excel from recognizing the value as a number. By dedicating one row to the activity type and another to the mileage, you can easily use the SUMIFS function.

1
Separate categories and values

Create a dedicated row or column for your activity labels (e.g., enter 'Run', 'Walk', or 'Bike' in cells B3 through Y3). Enter the pure numeric mileage directly below or next to the corresponding label (e.g., cells B4 through Y4).

2
Calculate Walk Total

Select the cell where you want the walking total. Enter the formula =SUMIFS($B4:$Y4, $B$3:$Y$3, "Walk") and press Enter.

3
Calculate Bike Total

In the cell for the biking total, enter the formula =SUMIFS($B4:$Y4, $B$3:$Y$3, "Bike") and press Enter.

4
Calculate Run Total

If you just need a continuous sum of a specific row where only running is logged, simply use =SUM(B4:Y4).

Use a Structured Layout with SUMIFS (Recommended)
Best Practice: Keeping numbers and text in separate cells is a fundamental rule in spreadsheet design. It ensures your worksheet remains easy to manage, update, and analyze.
Easily Track Your Fitness Goals with WPS

Calculate Fitness Mileage with WPS Spreadsheet

WPS Spreadsheet offers full support for advanced functions like SUMIFS, LEFT, RIGHT, and VALUE. You can seamlessly manage your fitness trackers, reorganize data, and calculate activity mileage for free with an interface you already know.

  1. 1. Open your tracker: Launch WPS Spreadsheet and open your fitness tracking workbook.
  2. 2. Set up your layout: Ensure you have distinct header cells for activities like 'Bike', 'Run', and 'Walk', with numerical mileage directly underneath.
  3. 3. Enter the SUMIFS formula: Click the cell for your total, go to the Formula bar, and type =SUMIFS(. Select your mileage range, add a comma, select your headers range, add a comma, and type "Bike".
  4. 4. Complete the calculation: Press Enter to instantly view your total biking mileage. Repeat the process for walking.
Fully compatible with Microsoft Excel formulas and .xlsx file formats.Free, lightweight, and fast to launch for daily fitness tracking.Includes a rich library of health and fitness templates to save you setup time.Familiar UI means zero learning curve for Excel users.
microsoft office alternative - wps office

Frequently Asked Questions

How do I sum cells that contain both text and numbers without helper columns?

You can use complex array formulas combining SUM, VALUE, and MID, but this is prone to calculation errors and slows down your workbook. It is highly recommended to separate text and numbers into different columns instead.

Why is my SUMIFS formula returning 0 for my mileage?

This usually happens if your numbers are formatted as text, if there are hidden trailing spaces in your criteria headers, or if the sum range and criteria range do not match exactly in size (e.g., comparing rows B3:Y3 to B4:Z4).

Can I use wildcards in SUMIFS to sum cells starting with a specific letter?

SUMIFS can use wildcards (like 'W*') to identify cells, but it cannot automatically extract and sum the numeric portion of a string (like 'W5.87'). The formula will fail because it cannot sum text. You must extract the number first.

Does WPS Spreadsheet support the SUMIFS function?

Yes, WPS Spreadsheet fully supports SUMIFS and is completely compatible with Excel's syntax, allowing you to seamlessly calculate values based on multiple conditions.