All free tools

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.

What do you want to do?

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

How to use it

  1. Choose a task: count text cells, sum if, subtract, multiply or percentage.
  2. Type the cell or range references from your sheet, such as B2 or A2:A20.
  3. Copy the formula and paste it into a cell in Excel. It also works in Google Sheets and LibreOffice Calc.
  4. Change the example numbers to check the result by hand.

Worked examples

  • =B2-C2 with 500 and 180 gives 320.
  • =B2*C2 with 12 and 8 gives 96.
  • =(C2-B2)/B2 with 100 and 120 gives 20% (format as Percentage).
  • =COUNTIF(A2:A20,"*") counts only the text entries in A2:A20.
  • 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.