+ Reply to Thread
Results 1 to 6 of 6

Add multple types of data sequentially

  1. #1
    Registered User
    Join Date
    12-12-2014
    Location
    India
    MS-Off Ver
    10
    Posts
    27

    Add multple types of data sequentially

    Hi Team,

    Below is my user form and excel sheet snap where I want to add data after clicking on Insert Data button.
    userform.png

    I have written below code for Insert data button.:

    Please Login or Register  to view this content.
    I am facing below problems:
    - for first row it gives the Type mismatch error.
    - If I comment out 1st row for sequence number it adds values to first row and erase out the column labels.
    - Not able to add the date from user form to excel sheet it also gives the error of type mismatch

    Could you please help me to provide the solution on above three problems. Thanks a lot.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Add multple types of data sequentially

    The modification made to the first row will take care of your problems 1 and 2.
    About your 3rd problem, it would help a lot if you could attach a sample workbook to yourpost.
    Please Login or Register  to view this content.
    Regards
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Add multple types of data sequentially

    Posting a picture is not that helpful, since we can't work directly with it, but I'll take a guess based on the picture.

    If you only have a header row when you run the code below, then what is happening is the part before the equal sign is ending up in the cell below Sr. No. and attempting to place the value from the
    right side of the equal sign. The problem is the right side of the equal sign is trying to add 1 to the text header "Sr. No."
    Please Login or Register  to view this content.
    Because you then stopped using the first line of code your second line of code is going back up to the header row and offsetting one column into col B and putting the value from your form in col B of the header row your next like of code is going into the next column of the header row etc. etc.
    Last edited by skywriter; 04-18-2015 at 10:03 PM.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  4. #4
    Registered User
    Join Date
    12-12-2014
    Location
    India
    MS-Off Ver
    10
    Posts
    27

    Re: Add multple types of data sequentially

    Thanks a lot Pierre, it solves problem 1 & 2. I have attached a sample sheet to get the help on date problem. Thanks!
    Attached Files Attached Files
    Last edited by DURGESH88; 04-19-2015 at 01:12 AM.

  5. #5
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Add multple types of data sequentially

    Try this:

    I changed the name of the calendar to dtCalendar, if you want to just use this code you need to do the same, or the file I attached has it already set up.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-12-2014
    Location
    India
    MS-Off Ver
    10
    Posts
    27

    Re: Add multple types of data sequentially

    Thanks for the reply. I will check and update you on this.
    Last edited by DURGESH88; 04-19-2015 at 11:07 PM.

+ 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. Excel Chart with multple data points.
    By JeriB in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 09-26-2014, 03:40 PM
  2. Multple data Lists into one Row
    By Sarah Christian in forum Excel General
    Replies: 2
    Last Post: 12-02-2013, 06:45 AM
  3. Multple IF conditions matching data in a table
    By TonyGetz in forum Excel General
    Replies: 8
    Last Post: 12-14-2010, 02:59 AM
  4. Need help importing data to multple worksheets.
    By jgonzo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2006, 11:50 PM
  5. Sorting data in a workbook across multple worksheets
    By Phil in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 12:05 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