formula to insert a blank row after each name

Some videos you may like

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,386
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
example

ravi
manoj
shankar

after using the formula

ravi

manoj

shankar
Formulas return a value. They can't be used to insert rows. This can be done with VBA (a macro). Are you willing to use a macro?
 

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,386
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
yes sir am willing to use macro. sorry to say i dont know how to use macro please
OK. Here's a macro that assumes your list of names is in column A. If that's not the case the code below will need to be adjusted to the actual range you are using.
To install the code:
1. With your name list worksheet active, press alt + F11 keys. This will open the VBE window.
2. On the VBE menu, choose Insert/Module.
2. Copy the code below from your browser window and paste it into the white space in the VBE window.
3. Close the VBE window and Save the workbook. If you are using Excel 2007 or a later version do a SaveAs and save it as a macro-enabled workbook (.xlsm file extension).
4. Make sure you have enabled macros whenever you open the file or the code will not run.
Code:
Sub InsertBlankRowAfterEachName()
Dim lR As Long
lR = Range("A" & Rows.Count).End(xlUp).Row
For i = Range("A1", "A" & lR).Rows.Count To 1 Step -1
    If Not IsEmpty(Cells(i, "A")) Then Cells(i, "A").Insert shift:=xlDown
Next i
End Sub
To run the code use the Excel View menu. View -->Macros --> View Macros. Find the macro and click Run.
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,122,371
Messages
5,595,784
Members
414,020
Latest member
Meghdad

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
Top