+ Reply to Thread
Results 1 to 4 of 4

Excel User form, match date to enter new data or insert new date/data into empty row

  1. #1
    Registered User
    Join Date
    02-12-2014
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Excel User form, match date to enter new data or insert new date/data into empty row

    Hi,

    I'm very new to VBA and coding, and I'm looking to create a user form to enter results from water testing from different locations.
    The form allows the user to enter the date the data was collected, the location, parameter and the result as seen here UserForm.JPG

    I want to navigate to the appropriate sheet and search for the date entered into the user form, if the date is found, the result is then entered into the appropriate column.
    If the date is not found, the form will find the next empty row and insert the date and the data.

    Here is what the spreadsheet looks like, Excel Sheet Ex.jpg

    I've found and altered code to select the sheet, find the next empty row and then insert the date and data, but I have no clue on how to actually going about looking to see if the date already exists.
    I'm thinking I need some sort of IF statement combined with a FOR loop, or MATCH/FIND function, but really I don't have any idea
    Any help would be greatly appreciated as well as explanations on what the code is doing

    Here is the what I have so far
    Please Login or Register  to view this content.
    And here is the spreadsheet ALS Sample Results (Autosaved).xls
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,367

    Re: Excel User form, match date to enter new data or insert new date/data into empty row

    Give this a try. You may want to replace your text box for date with a calendar control.
    Attached Files Attached Files

  3. #3
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Excel User form, match date to enter new data or insert new date/data into empty row

    Here's my attempt.
    Attached Files Attached Files
    David
    (*) Reputation points appreciated.

  4. #4
    Registered User
    Join Date
    02-12-2014
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Excel User form, match date to enter new data or insert new date/data into empty row

    Thanks so much for these! And thanks Bernie for suggesting calendar control, I googled it and now have it incorporated in my form

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can't leave empty date textboxes on user form when using CDate
    By JTResearch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-20-2013, 11:37 AM
  2. [SOLVED] Pop up calendar to insert date in text box on user form
    By emilyloz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-11-2013, 08:16 AM
  3. Enter data in locked cell from user form
    By ajitexcel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-18-2012, 10:21 AM
  4. [SOLVED] Match data in cells then enter date in empty cell
    By MyComputerGuy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2012, 08:16 PM
  5. Auto insert date, time & user in columns when data is entered in another column?
    By shelbsassy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2007, 02:59 PM

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