Automatic Goal seek

Automatic Goal seek

Dear all,

I would like to make a table with automatic goal seek for each line.

I have attached the file I use and would like the following:

When I’m changing the ” wanted Margin %” column in G column I want the price in column H to change automatically.

Can somebody help me to make a macro for the entire list so i don’t need to make it for each line.

Thank you-

Morten

 

Answer:

You can try this macro.

Sub Test()

Dim aln As Range
With Sheets(“Summary inst”)
For Each aln In .Range(“d6:d24″)
aln.GoalSeek Goal:=aln.Offset(0, 3), ChangingCell:=aln.Offset(0, 1)
Next aln
End With

End Sub

File attached.

test-goal-seek1

You may also like...

Bir Cevap Yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Şu HTML etiketlerini ve özelliklerini kullanabilirsiniz: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>