Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have 2 columns on my worksheet. 1st is alphabetical list of projects, 2nd
are the identifying project numbers. when i enter a new project name at the top of the first column, i want it to enter directly into the correct alphabetical cell in the column |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Assume columns E & F with E1 and F1 empty and ready for data entry. The
following routine will run as soon as you have entered data in both E1 and F1. It will sort the data and leave a new empy area in E1 and F1: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Range("E1:F1"), Target) Is Nothing Then Exit Sub End If If IsEmpty(Range("E1")) Or IsEmpty(Range("F1")) Then Exit Sub End If Application.EnableEvents = False Range("E:F").Sort Key1:=Range("E1") Range("E1:F1").Insert Shift:=xlDown Application.EnableEvents = True End Sub This is worksheet code - don't put in a standard module. -- Gary''s Student - gsnu200720 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
auto enter date when another cell populated? | New Users to Excel | |||
Auto enter date when data in enter in another cell | Excel Worksheet Functions | |||
how do I turn ON auto REcalculate for formulas if new data enter? | Excel Worksheet Functions | |||
Auto-Enter Data from One Sheet to Another | Excel Discussion (Misc queries) | |||
using alt-enter entry in 1st row hides col alphabet headings | Excel Discussion (Misc queries) |