![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 1
|
I am trying to set up something like Goal Seek in VBA so
that I can run the following calculation (which has been simplified): A1 = X A2 = A1*100 A3 = 500 I want to write VBA code that will calculate "X" for A1 to equal 5 (since X*100=500). I cannot rewrite the formula in A1 because A2 is actually a combination of hundreds of formulas. Also, I can't use Goal Seek. I need something that will run random numbers until it finds a match. Any ideas? Thanks. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Why have you concluded that you can't use Goal Seek? Won't this work...
Range("A2").GoalSeek Goal:=Range("A3"), ChangingCell:=Range("A1") |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|