Sum text cells using criteria in excel
Question: I want to sum cells that have a "C" and a decimal number. The cells
have other numbers and variables in them as well, but I only want to add ones
with "C"s.
Example of what cells contain:
7.5 C
H
7.5
9.4 C
3.2 F
HV
V
4.7 C
Answer:
Formula in B10:
Download excel sample file for this tutorial.
Sum text cells using criteria.xls
(Excel 97-2003 Workbook *.xls)
Functions in this article:
ISNUMBER(value)
Checks whether a value is a number and returns TRUE or FALSE
SUM(number1,[number2],)
Adds all the numbers in a range of cells
SEARCH() Returns the number of the character at which a specific character or text string is first found, reading left to right (not case sensitive)
IF(logical_test;[value_if:true];[value_if_false])
Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE
LEFT(text;num_chars) Returns the specified number of characters from the start of textstring
Related blog posts
- Lookup with multiple criteria and display multiple search results using excel formula
- Filter unique text values in a range using “contain” condition in excel
- Filter unique distinct text values in a range using “contain” condition in excel
- Search for multiple text strings in multiple cells in excel
- Search for multiple text strings in multiple cells in excel, part 2







August 24th, 2009 at 4:18 pm
Hi,
You may also try this array formula
=SUM(IF((ISNUMBER(SEARCH("C",A1:A8))),TRIM(LEFT(SUBSTITUTE(A1:A8," ",REPT(" ",99)),20))*1))