# ExcelUse COUNTIF across a range of cells with formulas

#### Measterbro

I am trying to count the number of cells in a row that contain the letter "O". Every cell contains a formula. If I use this it works correctly and returns a one since D3261 has that letter:

Code:
``=COUNTIF(D3261,"O")``

However if I use this, I get a zero even though D3261 still has that letter:

Code:
``=COUNTIF(C3261:D3261,"O")``

If I remove the formulas from C3261 and D3261, and manually type the letter "O" in D3261, both formulas work correctly.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9070553,"math_prob":0.6105977,"size":701,"snap":"2022-27-2022-33","text_gpt3_token_len":200,"char_repetition_ratio":0.14777619,"word_repetition_ratio":0.4566929,"special_character_ratio":0.32382312,"punctuation_ratio":0.12751678,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9726685,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-07-03T06:16:09Z\",\"WARC-Record-ID\":\"<urn:uuid:bb4f2fe1-f0d0-4f20-9f28-fbd1cc22b357>\",\"Content-Length\":\"51715\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:a0513b9d-dc50-4d31-b7d1-58fb7d405615>\",\"WARC-Concurrent-To\":\"<urn:uuid:6c27b24a-29a6-4312-87fb-b8700b972fae>\",\"WARC-IP-Address\":\"104.21.6.187\",\"WARC-Target-URI\":\"https://www.pcreview.co.uk/threads/use-countif-across-a-range-of-cells-with-formulas.4072718/\",\"WARC-Payload-Digest\":\"sha1:G3277DA3FAMLLD5T65NDV46R7JJ6ZY7H\",\"WARC-Block-Digest\":\"sha1:VZIJBIZTMOUEFJEQNILGASMPK2JD72Z7\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656104215790.65_warc_CC-MAIN-20220703043548-20220703073548-00618.warc.gz\"}"}