first of all let me say that my knowledge of Excel is somewhat basic. I know about formulas but not indepth. I know about functions but nothing about programing. That being said, on with my question.
I'm currently building a office hockey pool spread sheet. I have my main sheet, the result of the games and the differential (see link above for reference, text is in french sorry about that). I will have another sheet, prediction sheet, that the participant will fill with their prediction about who's gonna win the game and by how many points (differential).
Now, I need the prediction sheet to calculate the points attribution depending on the prediction.
Here's how it's supposed to calculate:
1 point for winning team prediction (per game)
1 point for good differential (no mather what team won)
2 point if differential is 3 or higher.
User predictions go on "prediction" sheet, they input what they think the diff. will be on the same side as the team they pick to win.
So what I want to know is, what would be the best way to go about this, with a formula or with a custom function in VBA? I need to determine 1: if the prediction is in the same cell as the other sheet and 2: if the differential is the same as the game result.
Ok, re-reading this I know it's kind of confusing, but it's clear in my head... sorry about that. If anyone of you can make sence out of my problem, please help me by guiding me in the right way. Thank you very much.
If found part of my solution.
I used this formula (I know it can be shorter and better but that's the extent of my knowledge in excel):
=IF(OR(ISBLANK(COMPILATION!A4);ISBLANK(COMPILATION!A5));0;IF(OR(A4=ABS(COMPILATION!A4-COMPILATION!A5);A5=ABS(COMPILATION!A4-COMPILATION!A5));IF(OR(A4>=3;A5>=3);2;1);0))
Related
Don't laugh, but, from time to time, my friends and I host a multiple-course KFC dinner, and I have a spreadsheet to optimise the order. This is to make sure we order the right combination of 'bucket'-type items (i.e. SKUs that contain multiple pieces, often of different types):
to minimise leftover items
to reduce the total cost
Here is the spreadsheet I currently use, and here's a screenshot:
To use it, you first specify the number of participants in A2, and what you want each person to have in E2:E6 (we're really only interested in the chicken, so 'sides' are treated as generic to simplify).
Here's the manual part, that I'd like to improve.
The next step is to look at the ideal totals for each item (F2:F6), and to try to set the right quantities (H12:H20) of the 'bucket'-type SKUs that I have recreated (A11:G20), so that the output totals (H21:M21) match the ideal totals (F2:F6).
The optimisation part is to get the deltas (H22:M22) as close to zero as possible, and to get the total cost (N21) as low as possible.
So, my question is: is there a way to do this better? I think Excel has some sort of Solver functionality, but I'm afraid I don't know how I'd go about even starting to use that, as my Excel skills are pretty rudimentary. Oh, and in case it makes a difference regarding functionality, I'm using Excel for Mac v16.37.
Any thoughts gratefully appreciated! :)
I can't take any credit for this, but am happy to say that GSerg left me a couple of comments that pointed me in the right direction, and I now have Solver set up to organise my chicken parties!
Here are the parameters for anyone who is curious:
Edited:
after using Solver which Saulo Suggested I have managed to get excel sorting them in to groups up to 8 groups of 3. though am approaching troubles when going further ideally at this time I need to be able to do 18 groups of 3. but even with the same settings obviously adjusting for the increase in groups excel seems to belly up on the process and fails, any suggestions to adapt to this?
I am trying to figure out an easy and as accurate as possible without going too crazy with the math and formulas as I am basic with my excel coding (coding in general) to calculate the ideal groups of 3 based on rank and strength for a video game.
I want to pair the strongest with the weakest and then fill the gaps evenly for the 3rd person. so, that each team’s overall strength is the same roughly.
factors I have is a designated leader(rank) and an overall power level(strength).
doing this manually isn't too hard but trying to automate it is. any thoughts or suggestions would be amazing!?
something like this but automated which is where I am getting stuck, as I want to be able to add more players and adjust strengths as they come along.
Hope this makes sense.
Jordan, you have a classic situation to use "Solver". First of all, you have to make "Solver available in your Excel. Select Home -> Option -> Supplements -> Solver. Then, the solver button´s will be at the "Data" menu.
Solver is about solving a problem with especific conditions, changing specific cell, with specifc purpose. In your case, your purpose is creat teams with the minimal strength diference. A condition of your problem is that teams should have the same number of players. See how I organized the sheet.
Sheet
When do you open solver, the first field is "Seat Goal". Our goal (or purpose) is reduce the diference between teams as minimal as possible. So we selected the cell with the diference between teams. Then we have to tell to excel that our purpose is that cell have the minimal value (chossing "min").
Then we have to tell excel wich cells they can change values to achieve our goal. In this case, Excel can change the teams of player, so we select the cells with the teams.
Last we have to tell excel whats condition (or restrictions) of this problem. The first restction is that the total of player of team 1 is tree. The total of players of team 2 is, both, 3. Then we have to tell to excel what are the limits (superior and inferior) of values of variable cells. In this case, we chose superior or equal to 1, AND (other restrction) inferior or equal to 2.
Ok. Now we have a problem with specif goal, changing the value of specifc cells, with specif restriction. Now solver can work. Then choose the method of soluction "Evolutionary", Honestly, I do know the diference between the methods, but my experience is that evolutionary method works better than the others.
I recomend reading the excel tutorial on solver. At first, all of us think that is too dificult, but believe that is simpler than it seems.
I teach a budgeting course for my professional association. As part of that course, students are required to submit a draft budget as part of their marks. The budget template that I have to use is kindof set in stone. The association offers it's courses at various college locations and I can't just arbitrarily change it's contents.
That being said, marking this assignment is a pain in the neck! I'm looking for an easy way to be able to compare the values in a cell, and then mark it correct or incorrect, if it is within an expected range..
For example, students are required to estimate the expenses for the current year. If their estimate is within $200 +/- of what the answer key states, then I would mark their answer correct.
I am not a coder by trade, but rather an armchair coder who will search out and self teach what I need to solve my problem, so I'm not afraid of a bit of homework myself. I have not been able to find any solution so far. Right now, my students submit their assignment hardcopy, and I manually mark their spreadsheets. Tedious to say the least. Any searches I try to perform for academic marking of an Excel spreadsheet only return solutions to use Excel as a tracking tool for student marks, which is not what I'm looking for.
My college uses Desire2Learn as their online platform for content delivery, and students can submit their material electronically, I want an easy way to determine if they have completed the spreadsheet correctly.
Any help, or pointers in the right direction would be greatly appreciated!
There are probably several ways to tackle this problem but this might be something simple if the layout of the sheets doesn't change. You could create a worksheet with 3 sheets.
1. a sheet to copy their work into
2. "Master" sheet with the correct answers
3. "Grading" sheet that has formulas that calculate the difference (possibly within a range). For example IF(ABS(Sheet 1!B20 - Sheet 2!B20)>200,"Correct","Incorrect"). Calculates the absolute value of the difference between the same cell address on 2 different sheets then compares to the expected answer and returns Correct or Incorrect.
You would still have to copy their work into your master worksheet one at a time. Remember this only works if their worksheet layout doesn't change.
Post a rely along with a sample of the data if you need something more flexible.
I have an optimization problem that I try to tackle with solver. Among others, one decision variable is a cell containing a date. Based on a time series, Solver should pick the optimum point in time. However, while it changes the other decision cells, it never changes this one! I even tried dropping the other decision variables (holding them constant) - still no change.
To help you have a lock into my problem, I created and attach an Excel sheet (here: download link) with a simplified problem, where from a time series of stock prices Solver should pick the date with the highest price. (I am aware that this particular problem could easily be solved with the MAX formula, but my real optimization problem is much more complex and wouldn't allow for this solution.)
Solver still doesn't change anything at the initial date value - even in this very simplified setting!
From a mathematical point of view, the present problem could be characterized as a (non-linear) step function, where particular points in time (on the x axis) correspond to different prices (steps, on the y axis).
Is there any tricks involved to get solver to handle time (date) values?
If you have luck to find the right set of Solver settings to make it get to the correct solution (which would be Jan 10, 2009), I'll be more than happy to hear about them.
Edit: I found out that non-linear problems with non-smooth discontinuous functions (like this problem, which is basically a staircase function) are generally difficult to tackle by any (non-)linear optimizer. Can someone savvy in the matter help me reformulate the problem in a solvable way. I found a similar topic on stack overflow with a suggested solution (see first answer), but don't know how to apply it to my problem.
Thanks,
Steve
I got your spreadsheet to solve in Excel 2010, by adding the constraint $C$7 >= $C$13, and using the Evolutionary Method. You can probably figure out the Math method you mentioned, but you may need to do it in VBA instead of the Solver dialog.
Let's (for discussion purposes) say that I have x and y data in 2 columns. They're some measured data which, several times a day, a few of them are added (usually 4 times a day).
Now, I wish to plot y=f(x) (linear scale), but the problem is since data is constantly added to determine the number of points which will go in the plot. Always creating a new plot and then formatting it and all, is troublesome for ... reasons.
Is there a way to do this using excel's build in functions ? Should I use vba ? I tried googling, but I don't know what to search for. I'd appreciate any help on this, even if its just a point in the right direction.
Is there a way to tell excel, use all points in this column until you hit an empty cell ?
You can do this without any VBA. Jon Peltier has an example by Debra Dalgleish on his website:
http://peltiertech.com/Excel/Charts/DynamicColumnChart1.html
It can be pretty frustrating to Google anything related to Excel because there is so much junk out there, but I've found that if there's something "obvious" that you know shouldn't be so hard, one of the various "MVP" sites will have covered it.