General discussion

Locked

Excel formula, text in column to a value

By Ivan the Terrible ·
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?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by twobordercollies In reply to Excel formula, text in co ...

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.

Collapse -

by Ivan the Terrible In reply to

Cheers, simple really when you know how!

Collapse -

by Ivan the Terrible In reply to Excel formula, text in co ...

This question was closed by the author

Back to Software Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums