LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default Code that includes Solver taking extremely long time to execute

Hi all,

I have an issue where code that includes using Solver is taking extremely
long to complete on a user's system (30 min) whereas on my system it
completes quickly (4 min). The user has a very similar system to mine -- in
fact, they have a slightly faster processor and slightly more RAM.

Any idea on why it may be taking so long on my user's system? FYI - the
code automatically intsalls Solver and the user verified that Solver was
checked in VBA References prior to executing the code. Below are my user's
system details:

- VOSTRO1700 system (I have a Dell Inspiron 1420 -- this is the only
significant difference between our systems)
- Intel(R) Core(TM)2 Duo CPU T5470 @ 1.6GHz processor
- 2046 MB RAM
- 32Bit Operating System

Below is the code specific to Solver in the macro:

With Sheets("Transaction Summary")
'Sort so that clear hold transactions are first on the sheet
.Cells.Sort Key1:=.Range("AI2"), Order1:=xlDescending, Header:=xlYes,
MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
.AutoFilterMode = False
.Columns("A:AI").AutoFilter
.Rows("1:1").AutoFilter Field:=35, Criteria1:="here"
Sheets("Transaction Summary").Activate
'Set the binary range to be used in the sumproduct calc
ActiveWorkbook.Names.Add Name:="holdclearbin", _
RefersToR1C1:=.Range("AJ2", .Range("AI65536").End(xlUp).Offset(0, 1))
'Set the commission range for the sumproduct calculation
ActiveWorkbook.Names.Add Name:="holdclearcomm", _
RefersToR1C1:=.Range("L2", .Range("L65536").End(xlUp))
'Set the sumproduct calculation cell and range
.Range("AK1").Formula = "=SUMPRODUCT(holdclearcomm,holdclearbin)"
ActiveWorkbook.Names.Add Name:="holdclearsumprod", _
RefersToR1C1:=.Range("AK1")
'Set the sum of the commission calculation
.Range("AL1").Value = A.Offset(0, -5).Value
'Set and execute Solver
Sheets("Transaction Summary").Activate
SolverOk SetCell:="holdclearsumprod", MaxMinVal:=3,
ValueOf:=Range("AL1").Value, ByChange:="holdclearbin"
SolverAdd CellRef:="holdclearbin", Relation:=5, FormulaText:="binary"
SolverSolve userfinish:=True
End With

--
Robert
 
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
Processing taking a really long time SS Excel Discussion (Misc queries) 2 March 17th 09 02:19 PM
Subtotalling taking long time to complete AndyV Excel Worksheet Functions 4 July 14th 08 03:10 PM
Loop works correctly but takes extremely long to execute robs3131 Excel Programming 6 June 20th 07 03:29 PM
Excel Taking Long TIme to Start Sanford Lefkowitz Excel Discussion (Misc queries) 2 June 1st 07 05:35 PM
Why does this code take so long to execute. John Keith[_2_] Excel Programming 4 March 6th 05 07:44 PM


All times are GMT +1. The time now is 01:16 PM.

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

About Us

"It's about Microsoft Excel"