Results 1 to 4 of 4

VBA - add new row and copy values from cells to other cells on the new row

Threaded View

  1. #1
    Registered User
    Join Date
    12-22-2023
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    57

    VBA - add new row and copy values from cells to other cells on the new row

    Hi,

    When clicking the "add employee" button I want to add a new row after last row. Any value in yellow cell should go to the other yellow cell and so on.
    I've managed to make the VBA add a new row but struggling with the remaining part.

    Any input to get me started would be appreciated.

    Sample.png



    Formula: copy to clipboard


    Sub Add_Employee()

    Dim LastRow As Long
    LastRow = Cells(Rows.Count, "B").End(xlUp).Row + 1
    Cells(LastRow, "B").Value = "New Row"



    End Sub


    Best,
    Thomas
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. help with macro Copy-paste values (merged cells to single cells)
    By StoyC in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-14-2018, 09:58 AM
  2. [SOLVED] All cells to copy & paste as values Except those cells in which formulas starts with =SUM
    By abhinavbinkar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2018, 12:24 AM
  3. Replies: 3
    Last Post: 12-14-2015, 04:09 AM
  4. Replies: 7
    Last Post: 12-04-2012, 06:23 AM
  5. Macro which finds and copy's cells based on values in other cells.
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-24-2012, 05:11 AM
  6. Formula to copy and paste data in cells to other cells based on values
    By haleakala17 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-11-2012, 08:45 AM
  7. Replies: 2
    Last Post: 08-08-2006, 12:50 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