How to Add Rows in Excel with a Formula

Download ArticleDownload Article

Start by opening your project in Excel. Insert a row inside your data. Click to select the cell in the new row where you want to include the formula. Press Crtl + D. If you want to find the sum of two or more rows instead, see How to Sum Multiple Rows and Columns in Excel.

Method 1
Method 1 of 2:

Adding Rows to a Sheet with a Macro

Download Article
  1. How.com.vn English: Step 1  Open your project in Excel.
    To do this, double-click the Excel document that contains your data in Finder (Macs) or File Explorer (Windows). Alternatively, if you already have Excel open, click File > Open and select the file that has your data.
  2. How.com.vn English: Step 2 Make sure the Developer tab is displayed on your editing ribbon.
    If it isn't and you're using Windows, go to the File tab and click Options > Customize ribbon. Under "Main tabs'" check the box next to "Developer."
    • If you're using a Mac, enable the Developer tab by clicking the Excel menu at the top of the screen and selecting Preferences. Click Ribbon & Toolbar, check the "Developer" box in the "Customize this Ribbon" category, and click Save.
    Advertisement
  3. How.com.vn English: Step 3 Open the VBA editor.
    Click the Developer tab and select Visual Basic to do so. Alternatively, you can press Alt + F11.
  4. How.com.vn English: Step 4  Right-click a sheet.
    In the vertical menu on the left side of the window, you'll see a list of your workbook's sheets. Right-click on any of these to get another drop-down menu.
  5. How.com.vn English: Step 5  Hover your cursor over Insert and click Module.
    When you hover over Insert, a menu will pop out to the right of the menu. Clicking on Module will create a space for you to enter a VBA code and run it.
  6. How.com.vn English: Step 6  Enter this code into your VBA window:
    Sub Insert_Rows_Loop()     Dim CurrentSheet As Object     ' Loop through all selected sheets.     For Each CurrentSheet In ActiveWindow.SelectedSheets        ' Insert 5 rows at top of each sheet.        CurrentSheet.Range("a1:a5").EntireRow.Insert     Next CurrentSheetEnd Sub
    • With this code, you'll be inserting rows starting at A1 and ending at A5—that's 5 empty new rows at the top of the sheet.[1] You can replace these cell addresses with the location into which you want to place the code, such as beginning with the last row in the sheet to any ending point.
  7. How.com.vn English: Step 7  Press F5.
    Alternatively, you can click the green Play icon above the VB editor writing space.
  8. How.com.vn English: Step 8  Click OK to continue.
    This adds the rows to your sheet.
  9. Advertisement
Method 2
Method 2 of 2:

Adding Formulas to New Rows

Download Article
  1. How.com.vn English: Step 1 Open your project in Excel.
    To do this, double-click the Excel document that contains your data in Finder (Macs) or File Explorer (Windows). Alternatively, if you already have Excel open, click File > Open and select the file.
    • Use this method if you want to learn how to copy existing formulas into new rows you add to your data.
  2. How.com.vn English: Step 2 Insert a row...
    Insert a row inside your data. The keyboard shortcut you'll use can only add a formula from the row above it, so make sure you insert the row in the middle or the bottom of your data collection.
    • To insert a row, right-click the row below where you want the new row to be added, then click Insert.
  3. How.com.vn English: Step 3 Click to select the cell in the new row where you want to include the formula.
    Remember, this keyboard shortcut will copy the formula from the cell above to the cell you have selected.
    • The cell will highlight to indicate that it is selected.
  4. How.com.vn English: Step 4 Press Ctrl+D.
    The shortcut is the same for Mac and Windows and will fill the formula down from the cell above. [2]
  5. Advertisement

Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!

      About This Article

      How.com.vn English: Darlene Antonelli, MA
      Written by:
      How.com.vn Technology Writer
      This article was co-authored by How.com.vn staff writer, Darlene Antonelli, MA. Darlene Antonelli is a Technology Writer and Editor for How.com.vn. Darlene has experience teaching college courses, writing technology-related articles, and working hands-on in the technology field. She earned an MA in Writing from Rowan University in 2012 and wrote her thesis on online communities and the personalities curated in such communities. This article has been viewed 62,096 times.
      How helpful is this?
      Co-authors: 4
      Updated: May 13, 2022
      Views: 62,096
      Article SummaryX

      1. Open your project in Excel.
      2. Insert a row inside your data.
      3. Click to select the cell in the new row where you want to include the formula.
      4. Press Crtl + D.

      Did this summary help you?

      Thanks to all authors for creating a page that has been read 62,096 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement