• spit+sip=tips (2000)

    Author
    Topic
    #413082

    My daughter has this school project to figure out this number and I’m sure there’s a way in excel. spit + sip = tips… What’s the number and how do you calculate it in excel? Thanks for your help, as always…

    Viewing 5 reply threads
    Author
    Replies
    • #908562

      Side comment – what grade is your daughter in?!!?

      • #908938

        My daughter is in the 6th grade and solved it logically before I did. I attribute this to a) she has her mother’s knack for math and all the drugs I’ve taken over the years impairs my ability to think in a logical way, mathematically that is–that’s why there’s Excel!!!

      • #908939

        My daughter is in the 6th grade and solved it logically before I did. I attribute this to a) she has her mother’s knack for math and all the drugs I’ve taken over the years impairs my ability to think in a logical way, mathematically that is–that’s why there’s Excel!!!

    • #908563

      Side comment – what grade is your daughter in?!!?

    • #908564

      You can do it with trial and error in a macro if you do not want to solve it (but that takes all the fun out of it

      Steve

      Option Explicit
      Sub SpitSipTips()
          Dim vLetters
          Dim iNumbers(1 To 4) As Integer
          Dim x1 As Integer
          Dim x2 As Integer
          Dim x3 As Integer
          Dim x4 As Integer
          vLetters = Array("S", "P", "I", "T")
          Columns(1).ClearContents
          For x1 = 1 To 9
              x2 = 0
              Do While x2 < 10
                  x3 = 0
                  Do While x3 < 10
                      x4 = 0
                      Do While x4 < 10
                          If InStr(x2 & x3 & x4, x1) = 0 And _
                              InStr(x1 & x3 & x4, x2) = 0 And _
                              InStr(x1 & x2 & x4, x3) = 0 And _
                              InStr(x1 & x2 & x3, x4) = 0 Then
                              If Val(x1 & x2 & x3 & x4) + _
                                  Val(x1 & x3 & x2) = _
                                  Val(x4 & x3 & x2 & x1) Then _
                                  MsgBox "Values are:" & vbCrLf & _
                                          vLetters(0) & ": " & x1 & vbCrLf & _
                                          vLetters(1) & ": " & x2 & vbCrLf & _
                                          vLetters(2) & ": " & x3 & vbCrLf & _
                                          vLetters(3) & ": " & x4 & vbCrLf & vbCrLf & _
                                          x1 & x2 & x3 & x4 & vbCrLf & _
                                          "  " & x1 & x3 & x2 & vbCrLf & _
                                          "---------" & vbCrLf & _
                                          x4 & x3 & x2 & x1
                          End If
                          x4 = x4 + 1
                      Loop
                      x3 = x3 + 1
                  Loop
                  x2 = x2 + 1
              Loop
          Next
      End Sub
    • #908565

      You can do it with trial and error in a macro if you do not want to solve it (but that takes all the fun out of it

      Steve

      Option Explicit
      Sub SpitSipTips()
          Dim vLetters
          Dim iNumbers(1 To 4) As Integer
          Dim x1 As Integer
          Dim x2 As Integer
          Dim x3 As Integer
          Dim x4 As Integer
          vLetters = Array("S", "P", "I", "T")
          Columns(1).ClearContents
          For x1 = 1 To 9
              x2 = 0
              Do While x2 < 10
                  x3 = 0
                  Do While x3 < 10
                      x4 = 0
                      Do While x4 < 10
                          If InStr(x2 & x3 & x4, x1) = 0 And _
                              InStr(x1 & x3 & x4, x2) = 0 And _
                              InStr(x1 & x2 & x4, x3) = 0 And _
                              InStr(x1 & x2 & x3, x4) = 0 Then
                              If Val(x1 & x2 & x3 & x4) + _
                                  Val(x1 & x3 & x2) = _
                                  Val(x4 & x3 & x2 & x1) Then _
                                  MsgBox "Values are:" & vbCrLf & _
                                          vLetters(0) & ": " & x1 & vbCrLf & _
                                          vLetters(1) & ": " & x2 & vbCrLf & _
                                          vLetters(2) & ": " & x3 & vbCrLf & _
                                          vLetters(3) & ": " & x4 & vbCrLf & vbCrLf & _
                                          x1 & x2 & x3 & x4 & vbCrLf & _
                                          "  " & x1 & x3 & x2 & vbCrLf & _
                                          "---------" & vbCrLf & _
                                          x4 & x3 & x2 & x1
                          End If
                          x4 = x4 + 1
                      Loop
                      x3 = x3 + 1
                  Loop
                  x2 = x2 + 1
              Loop
          Next
      End Sub
    • #908686

      I logically solved it in about 2 minutes. But then, I’m a math geek.

      Spoiler:
      From the thousands column, you know that T=S+1. Based on that info, the ones column tells you that P=9. If P=9, then the tens column tells you that I is either 4 or 9. Since P=9, then I=4. The rest should be obvious.

      • #908830

        Yes this is the “fun way”. smile

        But you didn’t use excel to solve it, which was the question.

        Steve

      • #908831

        Yes this is the “fun way”. smile

        But you didn’t use excel to solve it, which was the question.

        Steve

    • #908687

      I logically solved it in about 2 minutes. But then, I’m a math geek.

      Spoiler:
      From the thousands column, you know that T=S+1. Based on that info, the ones column tells you that P=9. If P=9, then the tens column tells you that I is either 4 or 9. Since P=9, then I=4. The rest should be obvious.

    Viewing 5 reply threads
    Reply To: spit+sip=tips (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: