Excel Table of Items

H

Howdy

I would like to know how to get 25 lines of data with about 4 column
wide. then, I would like to add another line of data and have th
least current line drop out of the table.

Thank
 
O

Otto Moehrbach

If I understand you correctly, the 26th line of data will always be in the
same row, say row 26 if you don't have headers. That means that the row you
want to drop out will always be row 1.
The following macro will delete Row 1 if anything is entered in Row 26.
Note that this a sheet event macro and must be placed in sheet module for
the sheet you want this to occur. Click on the sheet tab, select View Code,
and paste this macro into that module. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 26 Then
If Target = "" Then Exit Sub
[A1].EntireRow.Delete
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top