I am doing a maximize profit problem with excel. I would like one of my constraints to be only even numbers for the cells in the "by changing cells". How do I add this constraint?
I am doing a maximize profit problem with excel. I would like one of my constraints to be only even numbers for the cells in the "by changing cells". How do I add this constraint?
Could you use data validation > Custom
=MOD(E1,2)=0
VBA Noob
_________________________________________
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
I am not sure what that is. Would you mind explaining how I would use this to add an even constraint to a group of cells such as A1-A10? I don't understand what to type and where to type it.
Link should help
http://www.contextures.com/xlDataVal07.html
VBA Noob
I highlighted the cells I wanted to solve for even responses, went to data validation, chose custom and typed in "=MOD(E7,2)=0" in the formula box. What does this formula mean? I am still getting odd numbers spit out by solver. I appreciate the help.
Change E7 to the first cell of your range
e.g your range is E1 to E7 then select the cells and then in data validation enter
=MOD(E1,2)=0
HTH
VBA Noob
My data set starts with cell E7. I get what is going on with the data validation. Excel will now not let me type in an odd number, but solver still uses odd numbers in the results. Any thoughts?
sorry for the confusion
I don't have solver installed so can't help
maybe these links will help
http://office.microsoft.com/en-us/ex...118641033.aspx
http://www.dailydoseofexcel.com/arch...sum-to-target/
VBA Noob
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks