Discussion Locked

Excel formula, text in column to a value

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a column in my excel spreadsheet that has a name entry, e.g D1 = Tony, D2 = Fred, D3 = Gordon, etc. The names can appear in the same column more than one, e.g Tony appears say 5 times, Fred 2 times and Gordon 4 times.

I need a formula that will take the values of Tony and Fred in the column D, and calculate the value the total (=6).

I can use the formula =COUNTIF(D1:D10,"Fred") and this will give me 2, but I really need to say give me the total of Tony and Fred?

Not being an expert with excel I've run out of ideas?

3 replies

by twobordercollies

Use the CountIf Function, see below:

=COUNTIF(B2:B10,"Fred") + COUNTIF(B2:B10,"Tony")

That will give you the total of Tony and Fred together.

This discussion is closed to new replies.