+ Reply to Thread
Results 1 to 8 of 8

Moving to next Row

  1. #1
    Registered User
    Join Date
    03-06-2007
    Posts
    13

    Moving to next Row

    Hi all

    I am fairly new to Excel so if this is easy please excuse me.

    How can you get excel to move to the next row. I will explain more.
    in a2 b2 and c2 I have to copy the current date, time and my name.

    I have entered the following into cells a1 b1 & c1

    a1 current date =today() b1 my no. (1235) c1 current time =now()

    I have a macro which will copy the info above into a2 b2 & c2.

    I then have to manuallly enter more data into cells d2 to g2 and there could be a gap of a few sceonds before I have to enter more data.

    I then move to the next row and have to enter current time date and no. again. If i use the macro it complets the row above. So how do I get it to drop one row and then copy a1:c1 to a3:c3. and not a2:c2 again.

    Hope this is clear
    Thank Bill

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    You can use two ways.

    The first macro will copy cells a1:c1 in the current selected row (where you are):
    Please Login or Register  to view this content.
    In the second way the macro see what is the first row and there copy a1:c1 cells:
    Please Login or Register  to view this content.
    I hope it's what you need.

    Regards,
    Antonio

  3. #3
    Registered User
    Join Date
    03-06-2007
    Posts
    13

    Almost working

    Hi thanks for the code. It almost works.

    It now copies a1 to c1 to the new row but it also updates the time copied above. So the time is the same in all rows.

    Any help appreciated.

    How do I get the macro to copy the value only as it pastes the function now() which updates the time.

    Thanks Bill

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi Bill,

    Just replace
    Please Login or Register  to view this content.
    by
    Please Login or Register  to view this content.
    HTH
    Carim


    Top Excel Links

  5. #5
    Registered User
    Join Date
    03-06-2007
    Posts
    13

    Compile error

    Hi Carim

    i have replaced the code with above and it now has a 1004 compile error.

    Any suggestions, you can probably tell I am no expert on Excel. Thanks

  6. #6
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    use following instruction
    Please Login or Register  to view this content.
    Bear in mind now() is a volatile function, i.e it updates itself upon calculation ...

  7. #7
    Registered User
    Join Date
    03-06-2007
    Posts
    13

    Working fine

    Hi Carim

    thanks for the solution, working fine
    Thanks once again

    Bill

  8. #8
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Glad you could fix your problem ...

    Thanks for the feedback

+ 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