Jump to content

formula para buscar objetivo o automatizarlo sin boton


Recommended Posts

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

Privacy Policy