Excel formula generator: count text, sum if, subtract, multiply, percentage
Choose what you want Excel to do, type your cell references, and copy the formula. Each one comes with a short explanation and a worked example.
Runs in your browser. Nothing you type is sent anywhere.
Your formula
=COUNTIF(A2:A20,"*")Counts cells in the range that contain text of any length. Numbers, dates and blank cells are not counted. COUNTA counts every non-empty cell, text or not.
For the list apple, 12, banana, (blank), 7 the result is 2.
Guides that use this tool
- 25 Claude Prompts for Work You Can Copy and Paste (Emails, Excel, Reports)
Twenty-five original, copy-paste Claude prompts for emails, Excel, reports and meetings, plus the Anthropic-documented…
- Power Automate Scheduled Flow: Send a Daily Report Email from Excel
Build a scheduled cloud flow that reads rows from an Excel table, formats them as an HTML table and emails the report…
- Clean Messy Spreadsheet Data with AI in Excel and Google Sheets
Use Copilot in Excel, the Google Sheets AI function, TRIM and Flash Fill to tidy and categorise messy data, with a…
- Power Automate Desktop for Beginners: Automate a Repetitive Task
Install Power Automate for desktop, record and edit your first desktop flow, use the Excel actions, and learn what you…
How to use it
- Choose a task: count text cells, sum if, subtract, multiply or percentage.
- Type the cell or range references from your sheet, such as
B2orA2:A20. - Copy the formula and paste it into a cell in Excel. It also works in Google Sheets and LibreOffice Calc.
- Change the example numbers to check the result by hand.
Worked examples
=B2-C2with 500 and 180 gives 320.=B2*C2with 12 and 8 gives 96.=(C2-B2)/B2with 100 and 120 gives 20% (format as Percentage).=COUNTIF(A2:A20,"*")counts only the text entries in A2:A20.
Related tools
- Percentage calculator: X% of Y, X is what percent of Y, and percentage increase or decrease, with the working shown.
- Number to words converter: Write numbers and rupee amounts in words, in lakh and crore or million and billion, for cheques and invoices.
- Unit converter: Convert length, weight, temperature and data sizes (KB, MB, GB in both 1000 and 1024).
- CSV to JSON converter: Convert CSV to JSON and back: quoted fields, any delimiter, header row, typed values and nested columns.
Questions people ask
What is the Excel formula for subtraction?
Excel has no SUBTRACT function. Type =B2-C2 to subtract C2 from B2. To subtract several cells, use =B2-SUM(C2:E2).
What is the Excel formula for multiplication?
Use the asterisk: =B2*C2. To multiply a range of cells together, use =PRODUCT(B2:B6). To multiply two columns row by row and add the results, use =SUMPRODUCT(B2:B6,C2:C6).
What is the Excel formula to count cells with text?
Use =COUNTIF(A2:A20,"*"). The asterisk wildcard matches any text, so numbers, dates and blank cells are not counted. =COUNTA counts every non-empty cell, including numbers.
What is the Excel formula for percentage?
For a part of a total, type =B2/C2 and format the cell as Percentage; 50 out of 200 shows 25%. For percentage change, use =(new-old)/old, for example =(C2-B2)/B2; going from 100 to 120 gives 20%.
How do I add up values that meet a condition?
Use SUMIF: =SUMIF(A2:A20,">100",B2:B20) adds the values in B on rows where A is greater than 100. For more than one condition use SUMIFS.