+ Reply to Thread
Results 1 to 10 of 10

Help with Formula for Baccarat

  1. #1
    Forum Contributor
    Join Date
    07-01-2017
    Location
    Las Vegas, NV
    MS-Off Ver
    Office 2013
    Posts
    132

    Help with Formula for Baccarat

    I am trying to write a formula for the game of baccarat. It has a notorious 3rd card rule to determine whether the "Banker" or the "Player" will take a third card.

    The simplest way I can think to do this would basically be...

    I have the Player Card in A1, The Banker Card in B1
    I am trying to put if A1=0 & B1=0 Then ... "Display this text", if A1=0 & B1 = 1 Then... "Display this different text" and so on.

    I can get parts of the formula, but every time I try to put it all together, I am getting errors.

    Any chance you can help me? I feel like its easier than I'm making it.

    I appreciate your help.
    Last edited by dareeldill; 10-15-2021 at 11:20 AM.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Help with Formula for Baccarat

    I can get parts of the formula, but every time I try to put it all together, I am getting errors.
    Given you have that much (and we don't)

    Please upload a sample workbook. The instructions are the top of the page in the 'gold' banner. HOW TO ATTACH YOUR SAMPLE WORKBOOK:
    Dave

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help with Formula for Baccarat

    Quote Originally Posted by dareeldill View Post
    I am trying to put if A1=0 & B1=0 Then ... "Display this text", if A1=0 & B1 = 0 Then... "Display this different text"
    Those two conditions are exactly the same. Maybe it would help if you would tell us exactly what the notorious rule is and also what are A1 and B1.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Contributor
    Join Date
    07-01-2017
    Location
    Las Vegas, NV
    MS-Off Ver
    Office 2013
    Posts
    132
    Quote Originally Posted by 6StringJazzer View Post
    Those two conditions are exactly the same. Maybe it would help if you would tell us exactly what the notorious rule is and also what are A1 and B1.
    In baccarat the player in the banker each receive two cards. The cards are added together to create a number between zero and 10. The third card rule states that if the player has a specific total and the dealer has a different sum then a third card will be dealt to the player or the banker or both.
    And the rules change for each sum.

    In A1 I will put the Sun for the players first two cards. In B1 I will put the sum for the bankers cards. So A1 can have a number between 0&9. B1 will have the same range.

    It will be a tedious process, but I want to cover every option. So if A1 equals 0 and B1 equals zero it will display one text. But if A1 equals 2 and B1 equals 7 it will display a different text. I hope this makes sense.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Help with Formula for Baccarat

    Please see: HOW TO ATTACH YOUR SAMPLE WORKBOOK at the top of this page.

  6. #6
    Forum Contributor
    Join Date
    07-01-2017
    Location
    Las Vegas, NV
    MS-Off Ver
    Office 2013
    Posts
    132

    Re: Help with Formula for Baccarat

    Ok looks like I have a copy of my workbook attached.

    My actual work book is on my work computer, and unfortunately has much private data, so please accept this example. But my formulas didn't work anyways so it was kind of useless.

    Thank you for your help.
    Attached Files Attached Files

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help with Formula for Baccarat

    Are the numbers in B3 and C3 the value of each hand (not just a card)?

    I suggest you use a table with all of the possibilities and results and then use a formula to look up the current state in the table. That is much better than writing a big formula that takes into account every possibility.

    I did a little homework on this. You need to evaluate two states:

    1. The first state is after the initial deal. The first action is what the player does, either draws a third card, or stands, based on this first state (the player draws unless he has a natural win, or has 6 or 7, or the Bank has a natural win).

    2. The second state is after the player's move (which was either draw or stand). This action considers the bank's hand and the player's third card. The bank's move depends on the bank's hand plus the player's third card, if the player drew.


    Your model seems to use only one state. You cannot know what the Bank will do until after the player draws a card, because the player's third card has to be taken into account with the bank's hand to determine whether the bank will draw or stand.

    This is an interesting problem but I have limited time today. I'll get back to you when I can.

  8. #8
    Forum Contributor
    Join Date
    07-01-2017
    Location
    Las Vegas, NV
    MS-Off Ver
    Office 2013
    Posts
    132
    Dang it. You’re right about having to have the bankers hand be determined by the players third card.

    I was so tired when I started this. I’m gonna have to think about this again and see how I want to do this.

    Frustrating. Thanks for taking the time to look like you did. I appreciate it.
    Last edited by AliGW; 10-16-2021 at 11:11 AM. Reason: PLEASE don't quote unnecessarily!

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help with Formula for Baccarat

    The only thing I knew about Baccarat is that there were playing it in the original Casino Royale movie. Interesting game.

  10. #10
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help with Formula for Baccarat

    Have a look at this. This plays one hand all at once. To make it more interesting to watch you could implement this in VBA so that you can deal one card at a time for added suspense, but it would be a complete rebuild.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Baccarat ScoreBoard Excel Macros
    By mizono031 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-26-2024, 12:56 AM
  2. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  3. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  4. Baccarat ScoreBoard Excel Macros
    By mizono031 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2017, 11:03 AM
  5. Baccarat system tester (identifying patterns)
    By JAucamp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-28-2016, 01:17 PM
  6. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  7. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1