+ Reply to Thread
Results 1 to 8 of 8

Code for Button to Submit Data to List in Numerical and Chronological Order

  1. #1
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Lightbulb Code for Button to Submit Data to List in Numerical and Chronological Order

    Yo ho!

    I have a workbook containing two sheets. An Entry Page and a Historical List. What I'm trying to accomplish is to have a code set up for the Submit button on the Entry Page which would send data entered therein to the Historical List in numerical and chronological order. I've attached the sample workbook, and I'll describe it in better detail:

    Here's what should happen - a user enters the item number first in Cell B2, and the code checks if the number entered is already on the Historical List. If it isn't, the user simply enters the rest of the information, hits the Submit button, and it gets added to the Historical List in the proper place. My preferred order is shown in the Sample Workbook. If the number entered into Cell B2 is already on the Historical List, the other cells on the Entry Page would then display the most current information of that item. If the user decides to change (update) this information and then submits it, a new addition would be added to the Historical List, as is shown once again in the attachment.

    Doable?
    Attached Files Attached Files
    Last edited by swordswinger710; 01-06-2012 at 10:47 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Code for Button to Submit Data to List in Numerical and Chronological Order

    The first step

    Please Login or Register  to view this content.
    then i would just filter by date
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: Code for Button to Submit Data to List in Numerical and Chronological Order

    This may seem like a dumb question, but where do I paste your code to make it work? I've hit Alt/F11 and pasted it in both sheets, the workbook, and I even tried to use it as a module, to no avail. I'm sure I'm missing something obvious, but my expertise in coding is still under construction as of yet.

    Thank you for your reply, and I look forward to learning more on how to make this work.

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Code for Button to Submit Data to List in Numerical and Chronological Order


  5. #5
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: Code for Button to Submit Data to List in Numerical and Chronological Order

    Pike, thank you so much, I'm getting some results now; still having a few issues though:

    New items get added to the Historical List just great. The only problem being, they aren't in the right place, and I can only seem to accomplish that by doing a manual sort every time I want to see the items in the right order. Is there a better way to do this?

    Also, when on the Entry Page I enter a number already listed on the Historical List, the latest information belonging to it doesn't display. Can this be done as well?

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Code for Button to Submit Data to List in Numerical and Chronological Order

    you can record a macro of the filter process and then reuse it

  7. #7
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: Code for Button to Submit Data to List in Numerical and Chronological Order

    I've always wondered how the whole recording thing works, but never had it explained to me properly. What does that do, and how do I do it and make it part of my code?

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Code for Button to Submit Data to List in Numerical and Chronological Order

    Roy and jack have a good tutorial here on recording macros http://www.excel-it.com/excel_tutorials.htm Let me know if you how you go.

+ 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