Así lo he hecho, he aceptado la segunda columna de anotación y he añadido una macro:
Private Sub Worksheet_Calculate()
Dim f As Long
Dim disparar As Boolean
' Si ya se disparó una vez, salimos
If Me.Range("XX2").Value <> "" Then Exit Sub
' Comprobamos si alguna W llegó a 2
For f = 2 To 6
If Me.Cells(f, "W").Value = 2 Then
disparar = True
Exit For
End If
Next f
' Si ninguna llegó a 2, no hacemos nada
If disparar = False Then Exit Sub
' Guardamos TODO el rango como base
For f = 2 To 6
Me.Cells(f, "XX").Value = Me.Cells(f, "W").Value
' Fórmula en Y restando su base
Me.Cells(f, "Y").FormulaLocal = _
"=CONTAR.SI.CONJUNTO(Datos!B:B;$V$1;Datos!D:D;$V" & f & ")" & _
"-CONTAR.SI.CONJUNTO(Datos!B:B;$V$1;Datos!E:E;$V" & f & ")" & _
"-XX" & f
Next f
End Sub
No es la opción más bonita porque sigue contando los objetos en la columna W, pero la función me resulta suficiente para poder llevar la cuenta.
Tendré que hacer una pequeña macro para cada jugadora, son 14, pero espero no tener problemas
Por
Maku, · publicado
Buenas noches,
Estoy intentando utilizar esta macro pero no me responde y desconozco porqué.
Además el navegador que uso suele ser chrome. ¿Alguien puede ayudarme a saber porque no se ejecuta bien?
Gracias
adjunto código
---
Sub scrapeHyperlinksWebsite()
Dim ie As InternetExplorer
Dim html As HTMLDocument
Dim Link As Object
Dim ElementCol As Object
Dim erow As Long
Application.ScreenUpdating = False
Set ie = New InternetExplorer
ie.Visible = False
‘ie.navigate “http://www.rondebruin.nl/contact.htm”
‘ie.navigate “http://info.mathxlforschool.com/contact-us”
ie.navigate “http://www.iberia.es”
Do While ie.readyState <> READYSTATE_COMPLETE
Application.StatusBar = “Loading website…”
DoEvents
Loop
Set html = ie.document
‘Range(“A2″) = html.DocumentElement.innerHTML
Set ElementCol = html.getElementsByTagName(“a”)
‘Set ElementCol = html.getElementsByTagName(“mailto:”)
For Each Link In ElementCol
If InStr(Link, “mailto:”) Then
erow = Worksheets(“Sheet1″).Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Cells(erow, 1).Value = Link
Cells(erow, 1) = Right(Link, Len(Link) – InStr(Link, “:”))Cells(erow, 1).Columns.AutoFit
End If
Next
Set ie = Nothing
Application.StatusBar = “”
Application.ScreenUpdating = True
End Sub