Tables

itsgrady

Board Regular
Joined
Sep 11, 2022
Messages
116
Office Version
  1. 2021
Platform
  1. Windows
  2. MacOS
I use tables all of the time in Excel—makes life easier.

I have some tables in Excel with thousands of rows of information and it is hard to remind all endusers to use the shortcuts to navigate to the bottom of the table to add data on a new row. Is there a way to add data and a new row at the top of a table?

For each day of the year I have to enter the sales for each department for each day. It would be nice to enter this on the top row of the table.

Thanks for the help.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Here you go. Add a button/shape and assign the macro

VBA Code:
Public Sub InsertProjectListRecord()
' insert a record

    Dim nws As Worksheet
    Dim nRow As ListRow

    Set nws = ActiveSheet ' your sheet
    
    Application.ScreenUpdating = False
    Application.EnableEvents False
    
    Set nRow = nws.ListObjects("TBLNAME").ListRows.Add(1, AlwaysInsert:=True)
    ' select the new row
    nRow.Range(, 4).Select
    
    Application.ScreenUpdating = True
    Application.EnableEvents True
    
    Set nRow = Nothing
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,890
Messages
6,127,598
Members
449,388
Latest member
macca_18380

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top