ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do you get the sum of 2 different text values? (https://www.excelbanter.com/excel-discussion-misc-queries/55068-how-do-you-get-sum-2-different-text-values.html)

sunshine.girl

How do you get the sum of 2 different text values?
 
For instance, I need to add the amount of times "S" and "HS" appear in a row.
I figured out that the COUNTIF function will add the amount of times "S"
appears in a row, but I can't figure out how to make it add both and give me
a number value as the answer. Is this even possible?

PCLIVE

How do you get the sum of 2 different text values?
 
Try this:

=COUNTIF(A:A,"S")+COUNTIF(A:A,"HS")

Regards,
Paul

"sunshine.girl" wrote in message
...
For instance, I need to add the amount of times "S" and "HS" appear in a
row.
I figured out that the COUNTIF function will add the amount of times "S"
appears in a row, but I can't figure out how to make it add both and give
me
a number value as the answer. Is this even possible?




sunshine.girl

How do you get the sum of 2 different text values?
 
I just got the answer, if anyone is curious. The formula would read as
follows: =COUNTIF(B10:AF10,"S")+COUNTIF(B10:AF10,"HS")

"sunshine.girl" wrote:

For instance, I need to add the amount of times "S" and "HS" appear in a row.
I figured out that the COUNTIF function will add the amount of times "S"
appears in a row, but I can't figure out how to make it add both and give me
a number value as the answer. Is this even possible?


Dave Peterson

How do you get the sum of 2 different text values?
 
One mo
=SUM(COUNTIF(B10:AF10,{"S","HS"}))



sunshine.girl wrote:

I just got the answer, if anyone is curious. The formula would read as
follows: =COUNTIF(B10:AF10,"S")+COUNTIF(B10:AF10,"HS")

"sunshine.girl" wrote:

For instance, I need to add the amount of times "S" and "HS" appear in a row.
I figured out that the COUNTIF function will add the amount of times "S"
appears in a row, but I can't figure out how to make it add both and give me
a number value as the answer. Is this even possible?


--

Dave Peterson


All times are GMT +1. The time now is 03:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com