Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DEE DEE is offline
external usenet poster
 
Posts: 250
Default auto format cell to enter data alphabet in column

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default auto format cell to enter data alphabet in column

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
auto enter date when another cell populated? zim New Users to Excel 6 March 2nd 07 05:40 PM
Auto enter date when data in enter in another cell Brian Excel Worksheet Functions 5 December 7th 06 06:44 PM
how do I turn ON auto REcalculate for formulas if new data enter? Mark Excel Worksheet Functions 1 January 19th 06 03:19 AM
Auto-Enter Data from One Sheet to Another Christopher in Bellefontaine Excel Discussion (Misc queries) 4 April 24th 05 03:57 AM
using alt-enter entry in 1st row hides col alphabet headings Stephen S Excel Discussion (Misc queries) 2 March 10th 05 08:52 AM


All times are GMT +1. The time now is 07:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"