Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default I need help with a (apparently) very simple VBA script

HI Excel Programmers!

Here's my problem: I need to insert VBA code into an Excel Macro which
will loop a command (excel's "calculate") until a certain cell
(containing a sum) is greater than 1250. Here's the issue: the spread
is so complicated that it requires 4-5 minutes of calculation (on a
very fast machine). Here's what I need done:

1.) calcualte cells (calc takes 4-5 minutes)
2.) (after calculating cells) read the value of cell G3 (this is a
formula result)
3.) If the VALUE of cell G3 is greater than 1200, then stop and just
sit there
4.) if the VALUE of cell G3 is less than 1200, then calculate (loop)

Here's what I've got so far (hey it's a start!)

--------------------------------------------------------------

Sub Macro7()
'
' Macro7 Macro
' Macro recorded 6/3/2006 by *

Calculate
End Sub



Many thanks to anyone who can help!!!
-Frank Bosco

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default I need help with a (apparently) very simple VBA script

Does this work ???

Sub CalculateTil1200()
Do Until [G3].Value 1200
Calculate
Loop
End Sub

somethinglikeant




profbosco wrote:
HI Excel Programmers!

Here's my problem: I need to insert VBA code into an Excel Macro which
will loop a command (excel's "calculate") until a certain cell
(containing a sum) is greater than 1250. Here's the issue: the spread
is so complicated that it requires 4-5 minutes of calculation (on a
very fast machine). Here's what I need done:

1.) calcualte cells (calc takes 4-5 minutes)
2.) (after calculating cells) read the value of cell G3 (this is a
formula result)
3.) If the VALUE of cell G3 is greater than 1200, then stop and just
sit there
4.) if the VALUE of cell G3 is less than 1200, then calculate (loop)

Here's what I've got so far (hey it's a start!)

--------------------------------------------------------------

Sub Macro7()
'
' Macro7 Macro
' Macro recorded 6/3/2006 by *

Calculate
End Sub



Many thanks to anyone who can help!!!
-Frank Bosco


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default I need help with a (apparently) very simple VBA script

somethinglikeant:

Beautiful!
Thank you much. You are truly the master.

Best,
Frank Bosco
www.frankbosco.com



somethinglikeant wrote:
Does this work ???

Sub CalculateTil1200()
Do Until [G3].Value 1200
Calculate
Loop
End Sub

somethinglikeant




profbosco wrote:
HI Excel Programmers!

Here's my problem: I need to insert VBA code into an Excel Macro which
will loop a command (excel's "calculate") until a certain cell
(containing a sum) is greater than 1250. Here's the issue: the spread
is so complicated that it requires 4-5 minutes of calculation (on a
very fast machine). Here's what I need done:

1.) calcualte cells (calc takes 4-5 minutes)
2.) (after calculating cells) read the value of cell G3 (this is a
formula result)
3.) If the VALUE of cell G3 is greater than 1200, then stop and just
sit there
4.) if the VALUE of cell G3 is less than 1200, then calculate (loop)

Here's what I've got so far (hey it's a start!)

--------------------------------------------------------------

Sub Macro7()
'
' Macro7 Macro
' Macro recorded 6/3/2006 by *

Calculate
End Sub



Many thanks to anyone who can help!!!
-Frank Bosco


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
simple vb script to open, refina Excel Discussion (Misc queries) 0 June 14th 08 07:37 PM
My needs are simple-apparently, so am I LSUCHEER Excel Worksheet Functions 1 July 29th 05 08:05 PM
Apparently Simple Question exceller Excel Programming 1 May 13th 05 03:52 PM
Simple VB Script - Part 2 Graeme[_3_] Excel Programming 2 February 2nd 04 08:39 PM
Need help with simple VBA Script Donald Parker Excel Programming 7 January 25th 04 10:19 PM


All times are GMT +1. The time now is 10:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"