MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Conditional insert Row?


Posted by Mike on February 14, 2002 4:51 AM

Is is possible to have excel automatically insert a row when certain condition are met.
ie
Jan
Jan
FEB
FEB to
Jan
Jan

FEB
FEB

or to have all the Jan entries go to sheet 2
feb to sheet 3 etc
with sheet 1 having the entie list


Posted by Escalus on February 14, 2002 5:22 AM

to


This is easy to do manually and you can then use the macro recorder to create a macro :-

- Assuming your data is in column A (starting in row i), insert a column before column A.

- In the inserted column, select from A2 down to the last data row.

- Type in =IF(A2=A1,1,"") and press Ctrl+Enter.

- Go to Edit>GoTo>Special>Formulas>Text and click OK.

- Go to Insert>Rows.

- Delete the inserted column.