ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Drop down list box (https://www.excelbanter.com/excel-programming/326729-drop-down-list-box.html)

David Bateman

Drop down list box
 
They are on a spread sheet and we have probably 1100 attendance violations
per month. Is it possible to have a list box at the top of each column? One
column each for name, Date, time, violation, and have them populate down the
sheet to the first blank cell at the bottom of each column?



Patrick Molloy[_2_]

Drop down list box
 
your question is not clear. I get that you have four columns, but do you
want the new data to fill one row?

The following code will copy the data from row 1 to the next available row
where there is no data.

Sub AddRow()
Dim nextrow As Long
nextrow = Range("A65000").End(xlUp).Row + 1
With Range(Cells(nextrow, 1), Cells(nextrow, 4))
.Value = Range("A1:D1").Value
End With
Range("A1:D1").Value = ""
End Sub





"David Bateman" wrote:

They are on a spread sheet and we have probably 1100 attendance violations
per month. Is it possible to have a list box at the top of each column? One
column each for name, Date, time, violation, and have them populate down the
sheet to the first blank cell at the bottom of each column?




Shawn O'Donnell

Drop down list box
 
"David Bateman" wrote:
They are on a spread sheet and we have probably 1100 attendance violations
per month. Is it possible to have a list box at the top of each column? One
column each for name, Date, time, violation, and have them populate down the
sheet to the first blank cell at the bottom of each column?


It sounds like you want to record each 'attendance violation' in its own
row.

For data entry, you should consider creating a UserForm. The UserForm can
insure that you enter a complete, validated set of data in the last row, all
at once.

You could make the UserForm appear with a keystroke or a button on the
spreadsheet.


Debra Dalgleish

Drop down list box
 
If you have a list of attendance violations, you can use an AutoFilter
to add a dropdown list to each column heading.

There are AutoFilter instruction in Excel's help, and he

http://www.contextures.com/xlautofilter01.html

David Bateman wrote:
They are on a spread sheet and we have probably 1100 attendance violations
per month. Is it possible to have a list box at the top of each column? One
column each for name, Date, time, violation, and have them populate down the
sheet to the first blank cell at the bottom of each column?




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 03:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com