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
hola que tal no se como poder poner un listbox con barra de dezplamiento horizontal
¿alguna sugerencia?
este es mi codigo que no funciona
Private Sub Lst_nombres_Click()
Call DisplayHScroll
End Sub
Private Sub DisplayHScroll()
' Make no partial items are displayed vertically.
Me.Lst_nombres.IntegralHeight = True
Dim x As Integer
' Add items that are wide to the ListBox.
For x = 0 To 10
Me.Lst_nombres.Items.Add ("Item " + x.ToString() + " is a very large value that requires scroll bars")
Next x
' Display a horizontal scroll bar.
Me.Lst_nombres.HorizontalScrollbar = True
' Create a Graphics object to use when determining the size of the largest item in the ListBox.
Dim g As System.Drawing.Graphics
g = Lst_nombres.CreateGraphics()
' Determine the size for HorizontalExtent using the MeasureString method using the last item in the list.
Dim hzSize As Integer
g.MeasureString(lst_nombre.Items(Lst_nombres.Items.Count - 1).ToString(), Lst_nombres.Font).Width
' Set the HorizontalExtent property.
Me.Lst_nombres.HorizontalExtent = hzSize
End Sub