Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    spit+sip=tips (2000)

    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...

  2. #2
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: spit+sip=tips (2000)

    Side comment - what grade is your daughter in?!!?
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: spit+sip=tips (2000)

    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
    <pre>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</pre>


  4. #4
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    Louisville, Kentucky, USA
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: spit+sip=tips (2000)

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

    Spoiler:
    <span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">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.</span hide>

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: spit+sip=tips (2000)

    Yes this is the "fun way". <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

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

    Steve

  6. #6
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: spit+sip=tips (2000)

    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 [img]/forums/images/smilies/cool.gif[/img] 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!!!

Posting Permissions

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