miércoles, 14 de enero de 2026

EXCEL EVITA PARPADEO

 Application.ScreenUpdating = False ' al principio de la macro

Application.ScreenUpdating = True  'al final de la macro

viernes, 9 de enero de 2026

EXCEL SUMA SELECCIONANDO CELDAS CON CTRL + K

PONER EN THISWORBOOK 


Sub SumaAleatoria()

Dim pfil As Double

Dim ufil As Double

Dim pcol As Double

Dim ucol As Double

Dim sum As Double

pcol = Range(Selection.Address).Column

ucol = Range(Selection.Address).Column + Selection.Columns.Count - 1

pfil = Range(Selection.Address).Row

ufil = Range(Selection.Address).Row + Selection.Rows.Count - 1

a = Range(Cells(pfil, pcol), Cells(ufil, ucol))

sum = Application.WorksheetFunction.sum(a)

MsgBox ("Suma: ") & Format(sum, "#,##0.00")

End Sub


EXCEL BUSCAR EN COLUMNA


 

Sub buscalotes()

Dim variable As String

Dim resultado As Range

rango = "D2:J132"

variable = InputBox("Lote a buscar: ")

If variable = "" Then Exit Sub

Set resultado = Range(rango).Find(variable, LookAt:=xlWhole)

    If Not resultado Is Nothing Then

        Range(resultado.Address).Select

    Else

        MsgBox "No existe el lote"

    End If

End Sub