+ Reply to Thread
Results 1 to 11 of 11

Ticket sequence and total sold

  1. #1
    Registered User
    Join Date
    02-24-2012
    Location
    Texas
    MS-Off Ver
    Excel 2013
    Posts
    11

    Ticket sequence and total sold

    So I have created a Parking Report for our parking dept which contains the starting control number and an ending control number. For instance a cashier sold tickets starting at 45483 and ended with 45500. Simple math says that there is a difference of 17 tickets but in reality 18 tickets were sold (which includes ticket# 45483). Is there some sort of formula I'm missing or VB code that can display this properly? I have attached an example of what I'm talking about.

    Michael
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Ticket sequence and total sold

    Why can you just add an one at the end?

    (C3-B3)+1

  3. #3
    Registered User
    Join Date
    02-24-2012
    Location
    Texas
    MS-Off Ver
    Excel 2013
    Posts
    11

    Re: Ticket sequence and total sold

    Quote Originally Posted by JieJenn View Post
    Why can you just add an one at the end?

    (C3-B3)+1
    I can't because the 1 will always remain under the sold column regardless if nothing is entered under the start and end columns. I have multiple sets of these rows that add up in the end so that wont work properly. See attached.
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Ticket sequence and total sold

    If I underdtand you correctly....

    If the 1st number in the book at he start of the day was 45483 and the last number remaining in the book at the end of the day is 45500, then the actual number sold IS 17, not 18. The number that you will start with tomorrow at the start of the shift is 45500, so that ticket was not sold yesterday.

    If, on the oher handticket 45500 WAS sold, then the last ticket in the book would be 45501, which, if you subtract 45483 from, will give you 18. So it would seem that the simple c3-b3=17 does in fact work
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    02-24-2012
    Location
    Texas
    MS-Off Ver
    Excel 2013
    Posts
    11

    Re: Ticket sequence and total sold

    Quote Originally Posted by FDibbins View Post
    If I underdtand you correctly....

    If the 1st number in the book at he start of the day was 45483 and the last number remaining in the book at the end of the day is 45500, then the actual number sold IS 17, not 18. The number that you will start with tomorrow at the start of the shift is 45500, so that ticket was not sold yesterday.

    If, on the oher handticket 45500 WAS sold, then the last ticket in the book would be 45501, which, if you subtract 45483 from, will give you 18. So it would seem that the simple c3-b3=17 does in fact work
    Alright, I see where this is going. Its better if we had a visual. See attached pictures.

    In figure 1 the start number begins at 46201. The cashier sells 10 tickets which you would think everything including ticket 46211 is sold but actually its not, it ends at 46210 (Figure 3) if you count the first ticket.
    In figure 2 everything behind my finger is 10 tickets and sold already. 46211 is a complete and unsold ticket.

    So simple math:

    46210 - 46201 = 9 (Not right according to the tickets)

    Does this help?
    Attached Images Attached Images

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Ticket sequence and total sold

    46201 - 46202 - 46203 - 46204 - 46205 - 46206 - 46207 - 46208 - 46209 - 46210
    1 2 3 4 5 6 7 8 9 10

    So if the day starts with 46201 showing, and that is the 1st ticket sold...and ends with the last ticket showing 46211 (not sold, number of tickets sold = 46211 - 46201 = 10

    So the formula = end_Ticket_number - start_ticket_number withh still give you the correct answer

  7. #7
    Registered User
    Join Date
    02-24-2012
    Location
    Texas
    MS-Off Ver
    Excel 2013
    Posts
    11

    Re: Ticket sequence and total sold

    Quote Originally Posted by FDibbins View Post
    46201 - 46202 - 46203 - 46204 - 46205 - 46206 - 46207 - 46208 - 46209 - 46210
    1 2 3 4 5 6 7 8 9 10

    So if the day starts with 46201 showing, and that is the 1st ticket sold...and ends with the last ticket showing 46211 (not sold, number of tickets sold = 46211 - 46201 = 10

    So the formula = end_Ticket_number - start_ticket_number withh still give you the correct answer
    No, "number of tickets sold = 46211 - 46201 = 10" 46211 is NOT SOLD, therefore can NOT be part of this formula. Obviously this is harder to understand than I thought. The only tickets sold are 46201 through 46210. Subtract the 2 numbers and you get 9 the only thing thats entered are the tickets sold. Not the tickets remaining. In reality its 10 tickets, physically but the math reflects 9 using the control numbers.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Ticket sequence and total sold

    _____ ok ______

  9. #9
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Ticket sequence and total sold

    hi michaelof36, please check if that helps
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-24-2012
    Location
    Texas
    MS-Off Ver
    Excel 2013
    Posts
    11

    Re: Ticket sequence and total sold

    Quote Originally Posted by watersev View Post
    hi michaelof36, please check if that helps
    Works perfect! Exactly what I was looking for. Thanks for your help.

    Michael

  11. #11
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Ticket sequence and total sold

    if it takes care of your needs please mark the thread as Solved:

    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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