+ Reply to Thread
Results 1 to 7 of 7

Add data to rows consecutively

  1. #1
    Forum Contributor
    Join Date
    02-23-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    133

    Add data to rows consecutively

    Hello,

    I am making a sheet and stuck half way..
    In attached workbook, sheet 1 is not supposed to be touched.

    In sheet 2 you can see, mechanic name, work done (free or paid) and amount.

    I want a code and button in sheet 2.. I will enter data in only 1 row in sheet 2 and hit button, and it should get auto inserted in sheet 1 in next empty row (ie row 94 in sheet 1.)

    I will select Mechanic in sheet 2, select work type, and enter amount.. These 3 details will be filled in sheet 1 , row 94.
    Date should be auto =now() automatically..

    Also is there a way to check if by mistake button is pressed 2 times that its a duplicate entry? I want to avoid duplicate entry and need some warning.

    This seems very complicated, as i have googled a lot and i dont know vba..But i tried using conditional format and all.. but cant figure out a way..
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-23-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: Add data to rows consecutively

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-23-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: Add data to rows consecutively

    in attached book in sheet called "main" i need to copy b2 to e2 into sheet1 into last empty row (94)
    Data duplication check is secondary.. i will use some funcion for it.

    Thanks

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Add data to rows consecutively

    Hi moonbreakker

    Assign this Code to your Button.
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Forum Contributor
    Join Date
    02-23-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: Add data to rows consecutively

    Hello John. Thaks.

    John, hmm sorry, but does not seem to work.
    Can you do it in my file? I have uploaded my file

    Last empty row of sheet1 should be updated.
    In sheet2 row 2 should be copy pasted to last row in sheet 1...
    And date =today()

    Also if anything can be done to avoid duplicate entries.. (thats secondary)

    Thanks.
    Attached Files Attached Files

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Add data to rows consecutively

    Hi moonbreakker

    It won't work on the new File because the Structure is different from the original File.

    Doing the Data Entry on a Worksheet I can think of no clean way to update the SR NO and Date Fields before the Button is clicked.

    Because you want the SR NO and Date Fields auto-populated I'd suggest a User Form for your Data Entry.

    Shall I pursue this approach?
    Last edited by jaslake; 07-18-2015 at 02:32 PM.

  7. #7
    Forum Contributor
    Join Date
    02-23-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: Add data to rows consecutively

    Worked with old sheet. I changed some parameters. Sr No not updating is OK with my. My purpose is solved. Thank you very much.

+ 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. Replies: 6
    Last Post: 06-17-2014, 09:19 AM
  2. Average data consecutively between range of date-time
    By paluaja in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-14-2013, 12:27 AM
  3. run two Macros consecutively
    By Hassan1977 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-03-2013, 10:38 AM
  4. Replies: 14
    Last Post: 05-10-2013, 03:27 PM
  5. Add data files consecutively and add a column based on the file name
    By hippie_dream in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-10-2011, 06:26 PM
  6. [SOLVED] Number rows consecutively in Excel
    By Babs in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-15-2006, 04:50 PM
  7. Can excel consecutively number a cell? EX: consecutively number a.
    By sargon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-11-2005, 05:06 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