1. ## If Or (XP)

Please look at attached example. I can't figure out how to write a formula that tells me how many 2s, 4s and 3s are in this column!

Thanks again

Linda

2. ## Re: If Or (XP)

You can use the COUNTIF function: enter the possible values 2, 3, 4 and 5 in C2:C5. In D2, enter the formula =COUNTIF(\$A\$2:\$A\$17,C2) and confirm by clicking the green check. Then double click the fill grip (the black square in the lower right corner of the cell.

<table border=1><td></td><td align=center>C</td><td align=center>D</td><td align=center>1</td><td>GRADE</td><td>COUNT</td><td align=center>2</td><td align=right>2</td><td align=right>=COUNTIF(\$A\$2:\$A\$17,C2)</td><td align=center>3</td><td align=right>3</td><td align=right>=COUNTIF(\$A\$2:\$A\$17,C3)</td><td align=center>4</td><td align=right>4</td><td align=right>=COUNTIF(\$A\$2:\$A\$17,C4)</td><td align=center>5</td><td align=right>5</td><td align=right>=COUNTIF(\$A\$2:\$A\$17,C5)</td></table>
The above table shows the formulas; in your spreadsheet you will see the result.

3. ## Re: If Or (XP)

The following formulas gives you the number of 2s, 4s, and 3s. Is that what you wnat?

<pre>=COUNTIF(A2:A17,2)
=COUNTIF(A2:A17,4)
=COUNTIF(A2:A17,3)
</pre>

4. ## Re: If Or (XP)

Thanks - of course that works perfectly! I am waiting for her to email me her actual workbook, however. "They" never tell me the whole story on the phone. It may be that subtotals will work better.

Anyway - thanks again for saving me!

Linda

5. ## Re: If Or (XP)

Yep - that works as well. Thanks.

Linda

6. ## Re: If Or (XP)

another thing to do -- or at least I do this a lot when faced with this situation -- is import the column into Access and run a query on it that returns the number of each unique value. Copy the data, paste append it into access, name it something memorable, and run a query with one column for the values and a second column set to count the values. I know this may be a bit retarded, depending on your situation, but it's a quick and dirty way to get the values.

7. ## Re: If Or (XP)

Wow - I'm getting a real lesson today! Thanks Steve.

Linda

8. ## Re: If Or (XP)

no problem <img src=/S/aussie.gif border=0 alt=aussie width=21 height=22>

10. ## Re: If Or (XP)

Another stellar idea - I'll recommend that as well. Thanks again!

Linda

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•