Saltar al contenido

formula para buscar objetivo o automatizarlo sin boton

publicado

tengo una pregunta de como automatizar la funcion de buscar objetivo con fomrula o alguna forma mas comoda pero sin botones tengo esto epro no funciona aver si alguein me ayuda

Option Explicit

Private Sub Worksheet_Calculate()

automatizar

End Sub

Private Sub automatizar()

Static tb As Boolean

Dim i As Long

With hoja 1

For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row

If Round(.Cells(i, 3).Value, 6) <> 0 And Not tb Then

tb= True

.Cells(i, 2).Value = 0

.Cells(i, 3).GoalSeek Cells(i, 4).Value, ChangingCell:=.Cells(i, 2)

tb = False

End If

next i

End With

End Sub

Featured Replies

No hay posts para mostrar

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.