ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need a function for problem (https://www.excelbanter.com/excel-worksheet-functions/265375-need-function-problem.html)

steel108

Need a function for problem
 
I have spent the past few hours on this with no luck. I have very basic knowledge of Excel so that might be the problem. Here is what I am trying to figure out.... it's a poker simulation, but has applications to other fields.

I have $1,000
the pot is $150
There are 3 betting opportunities to bet

What is the least amount I can bet on the first and second betting opportunities so that the money I have will = the pot on the final betting opportunity.

An example:

if I bet 80 on the first opportunity, I will have 920 left and the pot will be 310

if I bet 200 on the second opportunity, I will have 720 left and the pot will be 710.

This is almost correct, but I have 10 more than the pot on the last betting opportunity.


I need a function that is dynamic since the pot and amount to bet will vary depending on the situation. If I want to run a query on 420 left with a pot of 80, the results should be adapted. I have tried doing this without functions, but I just can't it work for a wide set of variables (pot size and money left are the 2 variables with the betting sizes being the output)

Thanks for any advice you can give.

Is there a function that will achieve what I need?

DeFautT

Quote:

Originally Posted by steel108 (Post 958748)
I have spent the past few hours on this with no luck. I have very basic knowledge of Excel so that might be the problem. Here is what I am trying to figure out.... it's a poker simulation, but has applications to other fields.

I have $1,000
the pot is $150
There are 3 betting opportunities to bet

What is the least amount I can bet on the first and second betting opportunities so that the money I have will = the pot on the final betting opportunity.

An example:

if I bet 80 on the first opportunity, I will have 920 left and the pot will be 310

if I bet 200 on the second opportunity, I will have 720 left and the pot will be 710.

This is almost correct, but I have 10 more than the pot on the last betting opportunity.


I need a function that is dynamic since the pot and amount to bet will vary depending on the situation. If I want to run a query on 420 left with a pot of 80, the results should be adapted. I have tried doing this without functions, but I just can't it work for a wide set of variables (pot size and money left are the 2 variables with the betting sizes being the output)

Thanks for any advice you can give.

Is there a function that will achieve what I need?


You will need more than one formula in more than one cell.

Starting money= 1000
Starting Pot= 150

Bet one= (blank)
Bet two=(blank)
Bet three=(blank)

Current Money=sum(starting money-(bet one+bet two+bet three))
Current bet=sum(starting pot+(bet one+bet two+bet three))

Max bet to equal pot=sum((current money-current pot)/2)

in these formulas, the labels (starting money, bet one, bet two, ...) are cell numbers containing that info.

Let me know how it works for you.

TD

DeFautT

Quote:

Originally Posted by steel108 (Post 958748)
I have spent the past few hours on this with no luck. I have very basic knowledge of Excel so that might be the problem. Here is what I am trying to figure out.... it's a poker simulation, but has applications to other fields.

I have $1,000
the pot is $150
There are 3 betting opportunities to bet

What is the least amount I can bet on the first and second betting opportunities so that the money I have will = the pot on the final betting opportunity.

An example:

if I bet 80 on the first opportunity, I will have 920 left and the pot will be 310

if I bet 200 on the second opportunity, I will have 720 left and the pot will be 710.

This is almost correct, but I have 10 more than the pot on the last betting opportunity.


I need a function that is dynamic since the pot and amount to bet will vary depending on the situation. If I want to run a query on 420 left with a pot of 80, the results should be adapted. I have tried doing this without functions, but I just can't it work for a wide set of variables (pot size and money left are the 2 variables with the betting sizes being the output)

Thanks for any advice you can give.

Is there a function that will achieve what I need?


You will need more than one formula in more than one cell.

Starting money= 1000
Starting Pot= 150

Bet one= (blank)
Bet two=(blank)
Bet three=(blank)

Current Money=sum(starting money-(bet one+bet two+bet three))
Current bet=sum(starting pot+(bet one+bet two+bet three))

Max bet to equal pot=sum((current money-current pot)/2)

in these formulas, the labels (starting money, bet one, bet two, ...) are cell numbers containing that info.

Let me know how it works for you.

TD


All times are GMT +1. The time now is 06:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com