• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

What I did wrong

deciog

Active Member
Sirs

In Cell E4 it looks like it counts correctly
In Cell E5 does not count but shows zero
In cell E6 of error

If you drag the cell E6 to cell F4 or another cell of line 4 it shows value 1

I wonder why this happens? Where is the mistake I'm making?

Thank you very much in advance

Decio
 

Attachments

  • Modelo.xlsx
    11.9 KB · Views: 3
Hi,

=COUNTIF(INDIRECT("'"&NomesAbas&"'!D4"),Planilha1!C4)

>>

=COUNTIF(INDIRECT("'"&{"Planilha2";"Planilha3";"Planilha4"}&"'!D4"),Planilha1!C4)

>>

=COUNTIF({21;5;20},5)

>>

={0;1;0}

So,

1] If you want to return 0, 1 and 0

In E4, enter :

=COUNTIF(INDIRECT("'"&NomesAbas&"'!D4"),Planilha1!C4)

Then, select/hold E4:E6 altogether >> press SHIFT+CTRL+ENTER >> Finish

2] Or, if you want to return the total sum =0+1+0 =1

In E4, enter :

=SUM(COUNTIF(INDIRECT("'"&NomesAbas&"'!D4"),Planilha1!C4))

Regards
Bosco
 
Last edited:
Bosco

Excellent explanation now, I understand, thank you very much for the help

Hugs

Decio
 
Back
Top