Sunday, October 18, 2026

Extract Numbers from Text with VALUE in Excel

A formula can extract the number from entries such as 10ft or 100 pairs, but the most reliable solution is to keep the numeric value and the unit in separate columns. This prevents calculation errors and makes inventory reports easier to filter, sort and automate.

The problem

This issue came up in the r/excel community when someone was calculating price per item for inventory. A formula such as =A1/B1 works when A1 contains a price and B1 contains a number, such as a $10 pack divided into 5 items. The result is $2 per item.

The problem starts when the quantity cell contains both a number and text, such as 10ft or 100 pairs. Excel treats those entries as text, not as numeric cell values. A division formula cannot use them directly, so it returns an error.

The original discussion is available in the r/excel question about ignoring letters in cells.

Microsoft explains that numbers stored as text can produce unexpected formula results. Its recommended VALUE function can convert text that contains a valid number into a numeric value, but it does not solve every mixed entry that includes units.

The solution

Restructure the inventory table so the number and unit are stored separately:

Product Pack price Quantity Unit Price per unit
Cable 10 10 ft 1
Gloves 10 100 pairs 0.10

With the price in B2 and the quantity in C2, use:

=B2/C2

B2 is the pack price. The division operator / divides that price by the numeric quantity in C2. The result is the price per unit.

This is better than asking a formula to ignore letters because the workbook keeps data in a usable structure. You can calculate, sort, filter and summarize the quantity without cleaning the cell first.

You can still show the unit beside the quantity. Put ft, pairs, kg or another label in the Unit column. This also handles products with different measurement types without hiding information inside a text string.

If the unit must appear in the same cell for printing or presentation, use custom number formatting instead of typing the unit into the value. For example, a numeric cell containing 10 can display as 10 ft while remaining a number for calculations. In desktop Excel, select the cells, open Format Cells, choose Custom, and add the unit in quotation marks, such as:

0 "ft"

The 0 displays the numeric value. The text in quotation marks displays ft. Custom number formats change how a value looks without changing the underlying number. Microsoft notes that custom formats cannot be created directly in Excel for the web, so use the desktop application for this setup.

How to apply it

  1. Make a copy of the inventory workbook before changing the structure.

  2. Add a Quantity column beside the current column that contains entries such as 10ft or 100 pairs.

  3. Add a Unit column next to Quantity.

  4. Enter only the numeric portion in Quantity. Enter 10 instead of 10ft, and 100 instead of 100 pairs.

  5. Enter the measurement in Unit. Use ft for feet and pairs for pairs.

  6. Move the price into its own numeric column if it currently includes a currency symbol as text. A value such as 10 can still display as currency through number formatting.

  7. Replace the old calculation with =B2/C2, adjusting the column references to match your workbook.

  8. Fill the formula down the table by dragging the fill handle or copying the formula to the remaining rows.

  9. Format the result as currency or as a number with the required decimal places.

  10. If the unit must be visible inside the quantity cell, select the numeric Quantity cells and open Format Cells.

  11. Choose Custom and enter a format such as 0 "ft" for feet or 0 "pairs" for pairs.

  12. Test several products before deleting the old column. Include whole numbers, decimals, zero quantities and blank rows.

For an existing workbook that already contains mixed text, use a temporary cleanup column rather than manually editing every row. Microsoft recommends VALUE for text that represents a valid number, using a formula such as =VALUE(E2). This works when E2 contains numeric text, but entries such as 10ft may need a separate cleaning step because the unit is attached to the number.

A formula that extracts digits from arbitrary text can be built, but it is usually less robust for inventory. It may mishandle decimals, negative values, thousands separators or entries containing more than one number. Separating the fields avoids those risks.

If different rows use different units, do not convert them into one total unless the measurements are genuinely comparable. Ten feet, ten meters and ten pairs are different quantities. Keeping the unit in a separate column makes that difference visible.

Implementation angle

For a small inventory, separate Quantity and Unit columns provide a clean foundation for importing products into Zoho Creator or another database-style application. An automation in Make or n8n can validate that Quantity is numeric, check that Unit is present, and calculate price per unit before sending the record to accounting or reporting tools. Claude can also help review the workbook for mixed text values and generate cleanup formulas, but the final structure should keep numbers and labels separate.

For businesses managing larger inventories with multiple warehouses or stock locations, Zoho Inventory offers multi-warehouse tracking and automated reorder points that work seamlessly with properly structured data. When your spreadsheet outgrows manual management, structured data entry forms can enforce the separation of quantity and unit fields at the point of entry, preventing mixed-format errors before they occur.

Book an AI implementation engagement with Creator Scripts at creatorscripts.com.

Frequently asked questions

How can I separate numbers and units in Excel?

You can create separate columns for the numeric value and the unit in your Excel sheet. For example, have one column for quantity and another for the unit label like "ft" or "pairs." This method prevents calculation errors and makes your data easier to work with.

What happens if my quantity cell contains text?

When your quantity cell includes both numbers and text, like "10ft," Excel treats it as text instead of a numeric value. This can cause errors in formulas that expect numeric inputs, such as division. To fix this, you should store the number and the unit in different columns.

Can I format a cell to display units without changing the underlying value?

Yes, you can use custom number formatting in Excel to display units next to a numeric value. For instance, you can format a cell to show "10 ft" while keeping it as a number for calculations. This is done by selecting the cell, choosing Custom format, and adding your unit in quotation marks.

Saturday, October 17, 2026

Create a color scale legend in Excel Conditional Formatting

Excel does not provide a built-in legend for a conditional formatting color scale. The reliable workaround is to create a small key beside the heat map and apply the same color scale to it. This works well for sales reports, inventory dashboards, service levels and other business sheets where readers need to understand what each color means.

The problem

A heat map uses conditional formatting to turn numbers into a gradient. Low values receive one color, high values receive another, and values between them receive intermediate shades. Excel formats the data cells, but it does not automatically create a legend showing the relationship between color and value.

This problem came up in the r/excel community discussion about saving a color scale key. The practical answers reached the same conclusion: build a fake key from cells, then format those cells with the same rule as the heat map.

A color scale is calculated across the range to which its rule applies. The lowest and highest values receive the endpoint colors, while the values between them are colored proportionally. Microsoft documents the same behavior for Excel color scales, including the use of minimum, midpoint and maximum criteria.

The solution

Create a narrow strip of cells containing evenly spaced numbers from the smallest value to the largest value in your heat map. Apply the same preset color scale to that strip.

For example, if the heat map covers B2:F13, find its endpoints with:

  • =MIN(B2:F13), which returns the smallest number in the range.
  • =MAX(B2:F13), which returns the largest number in the range.

Suppose the results are 4 and 567. Create a row or column with 8 to 10 cells. Put 4 in the first cell and 567 in the last cell. Fill the cells between them with evenly spaced values, such as 4, 74, 144, 214 and so on.

Select the strip and choose Home > Conditional Formatting > Color Scales. Pick the same preset used by the heat map.

The important detail is that both ranges must use the same scale settings. Open Conditional Formatting > Manage Rules for the heat map and the key. Check that the minimum and maximum criteria match. Both ranges should use Lowest Value and Highest Value, or both should use fixed numbers such as 4 and 567.

A second option is to include the key cells in the existing rule. In Manage Rules, edit the rule's Applies to field and add the key range after the heat map range, separating the ranges with a comma. This keeps the data and key under one rule, so they use exactly the same scale.

The separate-rule method is easier to maintain when the key has a different layout. The shared-rule method is better when exact color consistency matters and the heat map range changes frequently.

How to apply it

  1. Select the complete heat map range, such as B2:F13.

  2. Open Home > Conditional Formatting > Manage Rules.

  3. Select the color scale rule and note how the minimum, midpoint and maximum are configured.

  4. In an empty area near the heat map, create a strip of 8 to 10 cells. Use a row for a horizontal key or a column for a vertical key.

  5. Enter the smallest value in the first cell. Use =MIN(B2:F13) if the range changes regularly.

  6. Enter the largest value in the final cell. Use =MAX(B2:F13).

  7. Fill the cells between the endpoints with evenly spaced numbers. Manual values are acceptable for a fixed report. Formulas are better when the source data changes often.

  8. Select the strip and choose Home > Conditional Formatting > Color Scales.

  9. Select the same preset used for the heat map.

  10. Open Manage Rules for the heat map and the strip. Confirm that the minimum and maximum settings match.

  11. Make the cells narrow so the strip looks like a thin bar. Resize the row height or column width until it fits the report.

  12. Keep the numbers visible if readers need precise thresholds. Place labels such as "Low" and "High" at the ends if the audience needs a quick visual explanation.

  13. To show only the gradient, select the strip, open Format Cells > Number > Custom, and enter ;;;. This hides the values while keeping the cell colors.

  14. Add the endpoint values in cells beside the strip or in a text box above it.

  15. For a quick formatting shortcut, copy a cell from the heat map, select the key strip and use Paste Special > Formats. Still check the rule settings afterward, because copied formatting does not guarantee that the two ranges use identical minimum and maximum criteria.

If the heat map represents a fixed business scale, such as inventory risk from 0 to 100, use fixed minimum and maximum numbers rather than the lowest and highest values in the current range. Otherwise, the same number may receive a different color when the data changes.

For example, a value of 80 could appear dark green in one month and yellow in another if the month's minimum and maximum change. Fixed endpoints make monthly reports comparable.

If the heat map represents relative performance within each current data set, use Lowest Value and Highest Value. That makes the colors adapt to the distribution of the current data.

Implementation angle

For a recurring sales or inventory workbook, the key can be generated automatically from the report's data range, then included in the same conditional formatting rule as the heat map. Teams looking to move beyond manual spreadsheet processes can explore workflow automation platforms that refresh Excel reports on schedule while preserving formatting rules. When spreadsheet complexity grows beyond manual maintenance, low-code application builders offer an alternative path for creating custom dashboards with built-in legends and dynamic color scales. For teams already invested in the Zoho ecosystem, Zoho Analytics provides native business intelligence features that eliminate the need for manual heat map legend workarounds.

Book an AI implementation engagement with Creator Scripts at creatorscripts.com.

Frequently asked questions

How do I create a legend for a conditional formatting color scale in Excel?

To create a legend, you can make a small strip of cells next to your heat map. Fill this strip with evenly spaced numbers from the smallest to the largest value of your heat map and apply the same color scale to it.

Why is my conditional formatting legend not matching my heat map colors?

This usually happens if the minimum and maximum settings for the legend and heat map are not the same. Ensure that both ranges use identical criteria, either using fixed numbers or have the same settings like "Lowest Value" and "Highest Value."

Can I automate the creation of a color scale legend in Excel?

Yes, you can automate the key generation for your heat map by creating a formula in your workbook. Utilizing workflow automation platforms can also help refresh your Excel reports on schedule and preserve formatting rules.

Copilot in Excel: preparar datos y reportes

Copilot in Excel: preparar datos y reportes

Copilot in Excel is expanding beyond analysis. It can now help prepare data, learn recurring workflows, and turn workbook results into connected reports. The changes matter most to small and mid-size businesses that use Excel for sales, inventory, quotes, management reviews, and recurring reports.

What changed

Microsoft announced several Copilot experiences that cover more of the work between raw data and a business decision. The update includes an interactive canvas, reusable skills, conversational data preparation, and data-quality checks. Read Microsoft's announcement about Copilot in Excel.

The most useful changes for operators are:

  • Interactive canvas: Copilot can turn workbook data into an interactive report for executive reviews, project updates, status reports, or other audiences. The report remains connected to the workbook, so it updates when the source data changes. You can ask Copilot to change the layout, highlight another insight, or adapt the report for a different audience.
  • Skill builder: You can describe a recurring process, provide instructions, share previous prompts, or show examples of completed work. Copilot can turn that knowledge into a reusable skill.
  • Skill recorder: Instead of explaining a process, you can demonstrate it while Copilot observes the steps and converts them into a reusable skill. Microsoft says skill recorder will be available in Insiders by the end of October.
  • Get data: Copilot can help bring in data through a conversational experience. You describe what you need, where it should come from, and how it should be shaped. Microsoft says this feature will roll out to general availability in mid-October through the Excel web app.
  • Clean data: Copilot can identify inconsistent values, incorrect data types, formatting problems, and possible duplicate records. It explains the issues and recommends corrections before analysis begins.

Microsoft lists interactive canvas as currently available in Insiders. Skill builder began rolling out to general availability in October, and clean data also began rolling out to general availability during the month. Availability may depend on service capacity and usage limits.

Why it matters for your business

Many businesses do not struggle because they lack data. They struggle because the data arrives in different forms and the same preparation work happens every week.

A sales report may contain customer names with different spellings. An inventory file may mix product codes with descriptions. A supplier file may use "USA," "US," and "United States" in the same column. Dates can arrive as text, quantities can use inconsistent formats, and duplicate records can distort totals.

These problems make analysis unreliable. They also consume time that an owner or administrator could spend on purchasing, customer service, or follow-up sales.

The new Copilot workflow addresses four practical stages:

  1. Bring the required data into Excel.
  2. Check and prepare the data.
  3. Repeat the business process consistently.
  4. Present the result in a report that stays connected to current information.

The interactive canvas is useful when different people need different views of the same workbook. A manager may need revenue by month and margin by product. A warehouse supervisor may need stock risks and pending purchases. A project lead may need delayed tasks and budget status. The underlying workbook can remain the source while the presentation changes for each audience.

Reusable skills can also reduce dependence on one employee. If one person knows how to prepare the monthly management report, that process can be documented through instructions or a demonstration. The goal is not to replace judgment. It is to make the repeatable steps easier to perform consistently.

How to use it

  1. Start with one recurring process. Choose a task that happens every week or month, such as preparing a sales summary, consolidating inventory files, or creating a cash collection report.
  2. Define the desired result. Write down the source files, required columns, filters, calculations, review checks, and final report sections.
  3. Review the workbook structure. Keep source data in clear tables with one row per transaction or item. Use separate columns for dates, codes, quantities, prices, customers, and status values.
  4. Try Get Data when available. Describe the information you need, the source location, and the shape you want. Check the imported result before using it for decisions.
  5. Run Clean Data. Look for inconsistent names, incorrect data types, formatting differences, and duplicates. Approve corrections only after checking that they match your business rules.
  6. Teach the recurring process. Use skill builder to provide instructions and examples, or use skill recorder to demonstrate the steps. Include checks such as comparing the total with the previous period.
  7. Test the reusable skill. Run it on a new file and compare the result with a report prepared manually. Correct missing steps before relying on it.
  8. Create the management view. Ask Copilot to turn the prepared data into an interactive canvas for the intended audience. Request a clear layout with the most important measures first.
  9. Check the report against the source. Verify totals, dates, filters, and unusual changes. A polished report can still present an incorrect conclusion if the source data is wrong.
  10. Set a review routine. Keep a person responsible for approving corrections, investigating exceptions, and confirming that the report supports the decision being made.

Do not begin with a large, complicated workbook. A small monthly report is easier to test, explain, and improve. Once the process is reliable, apply the same approach to other operational reports.

Implementation angle

This workflow can become the first stage of a broader automation system. A business could store structured sales, inventory, and purchasing records in Zoho Creator, use Make or n8n to collect files from shared folders, and send approved outputs into Excel for review. Claude can help document the business rules, check formulas, and compare Copilot's cleaned data with expected totals before a report reaches management. Book an AI implementation engagement with Creator Scripts to turn a recurring Excel process into a controlled, connected workflow.

Frequently asked questions

How can Copilot in Excel help my small business?

Copilot can assist with data preparation, workflow automation, and generating reports. It helps reduce manual errors and saves time on repetitive tasks, allowing you to focus on other important areas of your business.

What are reusable skills in Copilot?

Reusable skills allow you to document and automate recurring processes in Excel. You can either explain or demonstrate a task to Copilot, which then converts it into a skill for future use, helping ensure consistency in your operations.

How does the Clean Data feature work?

The Clean Data feature identifies problems in your data, like inconsistencies and duplicates. It suggests corrections, making sure that the data is ready for analysis and more reliable for making business decisions.