Encontrar datos en una seleccion!!

yeye

New Member
Joined
Jul 18, 2002
Messages
32
Como encuentro datos en una seleccion?
5 6 4 2 5
Necesito saber cuantos 5 hay en la anterior seleccion,
tengo un ciclo así

For each cell in Selection
if cell=5 then
encontrado=encontrado+1
end if
next

De que otra forma puedo hacerlo,
GRacias
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Gracia Juan Pablo,
porque no aparece esta propiedad(.CountIf()) cuando uno escribe :
application.

GRacias
 
Upvote 0
Es que en realidad aparece cuando uno hace

Application.Worksheetfunction.Countif

porque COUNTIF (CONTAR.SI) es una función de Excel. Solo que por facilidad (Y costumbre) lo pongo directamente como

Application.Countif
 
Upvote 0

Forum statistics

Threads
1,217,367
Messages
6,136,143
Members
449,994
Latest member
Rocky Mountain High

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top