close

I want to set up a formula to count certain items in a row based on what the
content is.

So, if the cell contains an quot;xquot; count it as 1, if it contains an quot;equot; count
it is 0.5, and then add up the values.

I hope that's clear enough

Hi!

Try this:

=COUNTIF(A1:J1,quot;xquot;) COUNTIF(A1:J1,quot;equot;)/2

Biff

quot;Mikakaquot; gt; wrote in message
...
gt;I want to set up a formula to count certain items in a row based on what
gt;the
gt; content is.
gt;
gt; So, if the cell contains an quot;xquot; count it as 1, if it contains an quot;equot; count
gt; it is 0.5, and then add up the values.
gt;
gt; I hope that's clear enough
works great, thanks...

question though, why the division by two?

wait, i think i understand why; you're dividing the second strand of values
that are counting the e's by two, thus giving me the 0.5

gt; question though, why the division by two?

Countif counts each instance of the criteria. Since quot;equot; has the value of 0.5
you can either divide the total count by 2 or multiply that total count by
0.5:

=COUNTIF(A1:J1,quot;xquot;) COUNTIF(A1:J1,quot;equot;)/2
=COUNTIF(A1:J1,quot;xquot;) COUNTIF(A1:J1,quot;equot;)*0.5

Dividing by 2 saves a couple of keystrokes!

Biff

quot;Mikakaquot; gt; wrote in message
...
gt; works great, thanks...
gt;
gt; question though, why the division by two?

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()