Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Spreadsheets (https://www.askmehelpdesk.com/forumdisplay.php?f=395)
-   -   Auto-Generate a number (https://www.askmehelpdesk.com/showthread.php?t=126639)

  • Sep 6, 2007, 12:40 PM
    sweetvaughn4402
    Auto-Generate a number
    Hello. I am having an issue figuring out a way to go about this. Here's my scenario: The company I work for uses forms that we can put products, purchased by other companies for each order made. Each form has its own unique WT number. I've been assigned the task of making this form as an excel spreadsheet. Normally this project would not be an issue because I could create a database holding a table that would have an initial starting WT number. From there I could increment the number each time the excel spreadsheet is opened and display it on the new form and save the new number in the database. But this needs to be excel run and I am not familiar with Microsoft databases as I work with PHP/MySQL.
    So, is there a way I can read from a text file and then save the new number to that text file, and repeat the process. Or even have two spreadsheets within the same workbook that interact in that manner. Thanks a bunch
  • Sep 6, 2007, 12:50 PM
    ScottGem
    I'm confused. Are you doing a form that will be saved to a database? If so, what database? If you are just doing this in Excel, than use the increment method you mentioned.
  • Sep 6, 2007, 01:18 PM
    sweetvaughn4402
    No database. But I figure because I won't be using a database that there will be an issue. Every time someone opens up this template there need to be a new WT number. Without somewhere to save the last number used it won't work, because when someone opens the template up to input a new order the number won't be the correct (incremented) number, right? Thus every time someone opens the template for a new order then the WT is the same, I think. In other words, every time someone opens this template and inputs the order then saves it, it's a new data (ordernumxxxx.xls) thus the original template isn't updated so it can't increment the next time it is loaded. Is this correct? So maybe I can make a button on the template so when I push it the form gets the number from a text file or additional spreadsheet and displays it in a cell, and also updates the text file or sheet.
  • Sep 6, 2007, 04:14 PM
    ScottGem
    If you are not saving the records in your Excel Workbook, then you do have to provide a method for saving the WT#. So Name a Cell in a different sheet or area WTNum. Set the WT# in the form to = the stored number + 1. Add a button to the form that will save the new number to the replace the stored one.

  • All times are GMT -7. The time now is 06:15 PM.