Maximize Value Within Several Defined Sets Of Constraints?

Jul 22, 2014

I am trying to maximize fantasy football points based on projected points scored, salary and positional limits.

I have multiple sheets dedicated one per position (i.e. sheet named "QB", sheet named "RB", etc.). The relevant columns are: Name; FPT (projected points); Cost

NOTE: I have combined all the data into "sheet1" if necessary.

I need a VBA program or Solver to diagnose the largest possible combination of projected points based on the following constraints:

Constraint 1: Total value must be less-than or equal to $1,000,000
Constraint 2: Total players used must be equal to 10
Constraint 3-?: Of the 10, 2 must be QB, 2 must be RB, 2 must be WR, 1 must be TE, 1 must be DEF.....the other 2 can be RB, WR or TE

Obviously, each player can only be used once and I'm not sure if Solver can abide by that constraint, nor do I know how to apply the others. I'm thinking VBA could work, but I'm not familiar enough with the language to hammer out the code.

I have a small macro that downloads some data from a website and tweaks it Daily fantasy cheatsheet.zipa little, but I hope that won't affect any computations involving those values.

View 4 Replies


ADVERTISEMENT

Maximize Performance Of Array In VBA

Jun 20, 2007

I'm trying to write some code that is performing operations on large arrays, using a pair of For loops. In languages like C++ and Fortran, it makes a big difference to the performance of the code which way round you put these 2 For loops, due to the way that array data is stored in the computer memory. However, for VBA, I've no idea which way round this is. For an array, A(i,j), do I want


For i = 1 To N
For j = 1 To M
A(i,j) = Cells(j, i).Value
Next j
Next i

View 9 Replies View Related

To Insert Down Between Sets Then Border Sets

Apr 10, 2008

Below is a series of sets. Column A is the set number. I need a macro that will insert a row between sets and then put a border around each set. In my spreadsheet the sets are from A1:C500. Sometimes the sets are only 1 row, sometimes multiple rows. It looks like I will be doing one of these sheets every week. So far I have been doing it manually, but a macro sure would save some time.

View 13 Replies View Related

Cannot Maximize Minimized Excel Window

Sep 18, 2013

Recently my friend forced Excel to close through Task Manager by Ending the Proccess... Since he did that, every .xls(x) file do not opens. No errors. Just Excel Icon on taskbar appears.... as it is minimized... But it doesn't minized.. Either this icon on a taskbar is minimized Excel icon, or this just an icon ....

RepairedReinstalleUpdated
No result ...

View 5 Replies View Related

Set Up Solver In Order To Maximize Revenue?

Jan 13, 2014

Any way to set up Solver in order to maximize revenue, but with the constraints equaling ONLY one of two values (e.g. 0 or 100)?

View 1 Replies View Related

Maximize Worksheet Upon Activation / Open

Feb 1, 2014

I am currently putting together a Directory and want each of the 19 programs and the worksheets to be maximized when they are opened.

View 1 Replies View Related

Excel 2010 :: How To Maximize Print Area

Dec 3, 2011

Using Excel 2010.

I am building a dashboard and would like to maximize the print area so everything fits on 1 sheet 8 1/2 x 11 landscape.

My settings at this point:
Margins:
Top 0.25
Right 0.25
Bottom: 0.25
Left 0.25

Row Height 7.5
Column Width 1.29

Seems small, I know but as I develop charts, titles, infographics, etc... I will merge rows and columns as needed so as to leave just enough white space for clarity while packing critical information into 1 sheet.

My problem - as I keep playing with maximimizing number of columns and rows Excel keeps scaling. Is there a way to calculate the correct number of rows and columns to maximize the available space?

View 2 Replies View Related

Worksheet Tabs & Minimize/Maximize Disappeared

Aug 31, 2007

Edges of worksheet have gone - no tabs, no minimise/maximise.

View 7 Replies View Related

How To Set Constraints As Integer In Solver

Mar 26, 2012

I want to set constraints as an integer in solver. But I don't know how to do it.

View 5 Replies View Related

Solver Add In But Unfortunately It Cant Take More Then 200 Constraints And Hence Gives An Error

Mar 9, 2008

I was able to find a solution using the excel solver add in but unfortunately it cant take more then 200 constraints and hence gives an error. I am unable to find a different approach to this problem.......

View 9 Replies View Related

Solver With Constraints For Inventory Levels

Nov 9, 2008

I have a maximization problem. I have to maximize Kitchen Sets given available materials. I have 11 different Kitchen Sets and every set requires different material.I have attached an excel spreadsheet for making the problem more clear.

I have T1;T2;T3;T4;M1;M2;M3;M4;O1;O2;O3;O4;Z1;Z2;Z3;Z4 different materials. Every kitchen sets requires one material from T which is fixed (for example T2), one material from M which is fixed again (for example M3), one material from O which is fixed (for example O1) and one material from Z, which is fixed (for example Z4).To complete a set the sum of all materials used should equal to 4. I have some constrains T1+T2+T3+T4<=2 it is the same for M1+M2+M3+M4<=2, O1+O2+O3+O4<=2 and Z1+Z2+Z3+Z4<=2.

So basically my goal is to say which materials should I keep in stock in order to maximize the Kitchen Sets.

View 9 Replies View Related

Calculate Time Spans With Constraints

Dec 20, 2006

I need to calculate time period worked between 19h00 and 24h00 in following exemples,

start time 08h00 and End time 20h00, would be 1 hour

start time 20h00 and End time 08h00, would be 4 hours

I can't get IF fonction to work with times..

View 9 Replies View Related

Calculate Time Difference With Constraints

Sep 30, 2007

i've two time constraints with 22:00~6:00 and 6:00~22:00. i'll apply time span to two constraints,calculate time covering on two constraints. it will start at anywhere of 00:00~24:00, time span will be 00:00 ~24:00. i add some formula, a3=start time, b3=end time. time constraints with 22:00~06:00:

=IF(AND(A3<=22/24,B3>=6/24,A3>B3),8/24,IF(AND(A3<6/24,OR(B3>22/24,AND(B3>0,B3<6/24,A3>B3))),IF(B3>=22/24,(B3-22/24)+A3-6/24,(B3+1-22/24)+MOD(6/24-A3,1)),IF(AND(OR(A3>=22/24,A3<B3,A3=0),B3<=6/24),IF(OR(A3=0,A3=1),B3,IF(A3>B3,B3+1-A3,B3-A3)),IF(AND(A3<=22/24,B3<=6/24),MOD(B3-22/24,1),IF(AND(A3>=6/24,B3<=22/24,A3<B3),0,IF(AND(A3>=22/24,B3>=6/24),(1-A3)+6/24,IF(AND(A3<=22/24,B3>22/24),B3-22/24,6/24-A3)))))))

time constraints with 06:00~22:00. :C$3=start time,$B4=end time...............................

View 5 Replies View Related

List Possible Combinations With Conditions/Constraints

Aug 9, 2008

I am trying to write VBA code that will list all possible combinations of data contained in a worksheet based on a few conditions. I have a list that varies in length. In the first column is a list of numbers denoting a particular course number. In the second column is a list of numbers denoting the specific class number for the course. As an example, I have a 6 courses. The first course has 1 class, the second course has 3 classes, the third has 11, the fourth has 3, the fifth has 7, and the sixth has 6. Thus, my columns look like this:

A B
1 1
2 1
2 2
2 3
3 1
3 2
3 3
3 4
3 5
...

I need to list out all possible combinations of classes given that I must have all six courses. EXAMPLE (Course, Class):.......................

View 2 Replies View Related

Application Defined Or Object Defined Error When Creating A Pivot Table

Oct 1, 2009

I keep running into this error when I try to create a pivot table.

The debugger highlights the following line:

View 4 Replies View Related

Excel 2003 :: Stuck On User-defined Type Not Defined Error?

Oct 9, 2012

Trying to convert an Excel 2003 macro to work in Excel 2007.

The problem line is

Dim MyDataObject As DataObject

I suspect the problem is a Missing Reference, but I cannot figure out which one. I have the same ones (in 2007) as 2003 except for one which is not showing

Microsoft Forms 2.0 Object Library

Is this the one it needs? It is called something else in 2007?

The ones I do have ticked are

Visual Basic For Applications
Microsoft Excel 12.0 Object Library
OLE Automation
Microsoft Office 12.0 Object Library
Microsoft ADO Ext. 2.8 for DDL and Security
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.8 Library
Microsoft Scripting Runtime
Microsoft XML v2.6

View 8 Replies View Related

Set Bold To Font On Another Worksheet: Application Defined Or Object Defined Error

Aug 25, 2006

'Code1
Call movedata(1, rrow, ecol, erow)
'Contact Person
Call movedata(26, rrow, ecol, erow)
Worksheets("new").Activate
Worksheets("new"). Range(Cells(erow, ecol), Cells(erow, (ecol - 2))).Font.Bold = True
'Name
Call movedata(2, rrow, ecol, erow)
'Street Address
Call movedata(3, rrow, ecol, erow)
'city
Call movedata(4, rrow, ecol, erow)
' zip
Call movedata(5, rrow, ecol, erow)
Worksheets("new").Range(Cells(erow, ecol)).Font.Bold = True
' speed dial
Call movedata(6, rrow, ecol, erow)

the first time font.bold is set to true, it completes w/o error. The bolded line returns 'application defined or object defined error 1004'. Ive tried activating the new sheet immediately before setting bold (like the first time it gets set) but it still errors.

View 5 Replies View Related

Application-defined Or Object-defined Error :: Add Named Range At Run-time

Oct 4, 2006

Trying to add a named range at run-time

Here's what I have so far ...

View 9 Replies View Related

Application-Defined Or Object-Defined Error Setting Validation Message

Nov 10, 2006

I have problems with setting Validation input title and message. When in column "C" I type product code, data validation of corresponding cell in column "D" changes to list of diameters allowed for that product. That works fine. But i also want to set validation message to show allowed diameters.I set it in VBA using named ranges.
But for every second line (13, 15, etc on attached file) I get an application-defined or object-defined error. The rest (14, 16 etc) works ok.

View 4 Replies View Related

Vehicle Routing With Two Dimensional Loading Constraints?

Jul 9, 2014

Whenever or not I should use VBA or ordinary formulas in Excel in order to do Vehicle Routing With Two-Dimensional Loading Constraints case. What I need is when I have coordinates of four bottom-right corners:

X Y
24 0
30 0
10 24
8 38

2L-CVRP, what I want to know is: In reality I have set of 200 coordinates (x,y) and I need to search for lowest y (its (24,0) and (30,0)) then I choose one with maximum x ((30,0) in this case). Then if for some reason item cannot be packed there, then I shall go to next lowest y, which is 24 giving coordinate (10,24), if I cannot use this corner, I search for next lowest y with as high x as possible, etc. BTW I use Evolver in order to find satisfying solution.

View 3 Replies View Related

Optimal Combination Model With Constraints & Variables

Aug 11, 2008

I need to optimize an Excel model with 5 variables each of which cam be any value from 1 to 20. The solution space, therefore, contains 3,200,000 combinations. I have a software(Palisade Risk) which can give out a random sampling of this solution space. I need to know how many combinations can be considered as a representative sample of this solution space - e.g. can it be 1%?.

View 5 Replies View Related

Excel 2010 :: User-Defined Type Not Defined Compile Error When Creating PowerPoint Using VBA

Jul 29, 2014

I am using Microsoft Excel 2010 and Microsoft VBA 7.0 on my system. I would like to eventually create a PowerPoint and insert charts generated in the Excel workbook. In the meantime, I cannot get the basic PowerPoint created.

The line in red is highlighted blue when the compile error "User-defined type not defined" message box appears.

Public Sub TryAgain() Dim myPowerPoint As PowerPoint.Application
'
' do nothing for now
'End Sub

I have set the references such that Microsoft Project 14.0 Object Library is indeed checked. The Excel file only contains this code in a module. All sheets are blank. Nothing else is written yet.

View 1 Replies View Related

Application-defined Or Object-defined Error On An Active Cell

Nov 22, 2008

I have a very strange problem in DEBUG mode, because i get this error "Application-defined or object-defined error" when referring to a cell and assigning it a value so it goes to my error handler and i have a Resume Next there. It continues to go through the code whilst continuing to go to the error handler but when i step out of the function it restarts again from the beginning on the called function and then on the second run of my code it seems to WORK!?! So i'm thinking what the hell is going on, it falls over and fails the first time round and works the second time round?
In free-run mode from excel i just get a #VALUE!

View 13 Replies View Related

Application-defined Or Object-defined Error :: On Open Everytime

Jan 13, 2009

I had to change sheet one but everytime I open this workbook, it keep saying "Application-defined or object-defined error"

but I cannot find what is causing the bug. I have checked the name of sheet and it seem correct for me in the codes.

View 7 Replies View Related

Range Selection Error (application-defined Or Object-defined)

Jun 9, 2009

I am having some trouble with a variable range selection within a regression. I keep getting an "application-defined or object-defined error." I've isolated each statement to find that the code that is causing the regression not to work is below (the error for that line of code states that the Select method of Range class failed):

View 6 Replies View Related

Application-defined Or Object-defined Error On Formula Entry

Aug 12, 2009

I'm trying to enter a series of formulas into a worksheet using vba. However, this code is giving me Run time error '1004', along with the description in the title. This is the first formula (they're all relatively similar).

View 2 Replies View Related

Application-Defined Or Object-Defined Error :: Subtracting Hours

May 23, 2007

I have a sub that takes the value of a cell and get the hour by using

mhours = Hour(KRT)

then using DateAdd I need to subtract the mhours from etd

and Im getting this error

Application-Defined or Object-Defined Error

Worksheets(b).Range("G" & q).value = DateAdd("h", mhours, etd)

Note: KRT and ETD are dim'd as Date
Note2: DateAdd returns the same error wether mhours is postive or negitive

View 9 Replies View Related

Application-defined Or Object-defined Error :: Range & Offset

Feb 26, 2009

this is the line it gives the error on.

Range("A1").End(xlDown).Offset(1,0).Select

View 9 Replies View Related

Sort Macro: Application-defined Or Object-defined Error

Aug 29, 2006

I get a run time error 1004 when I run this sort.

ActiveSheet. Range("A1:AC277").Sort Key1:=ActiveSheet.Range("G2"), Order1:=xlAscending, Key2:= _
ActiveSheet.Range("E2"), Order2:=xlAscending, header:=xlYes, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, _
DataOption2:=xlSortNormal

View 9 Replies View Related

AdvancedFilter: Application-defined Or Object-defined Error 1004

Nov 14, 2006

Im trying to copy all the unique values from one column to another and the easiest way seems to be:

Set SourceRange = Worksheets(page2). Range("C1:C17365")
SourceRange. AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Worksheets(sida3).Range("B"), Unique:=True

However, I get the error- message: Run-time error '1004': Application-defined or object-defined error

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved