Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BG BG is offline
external usenet poster
 
Posts: 31
Default Sorting Rows/Columns Automatically

I have a spreadsheet and I want to sort rows and columns automatically as I
enter data into blank cells. What is the best way to do this?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Sorting Rows/Columns Automatically

Use a Change event worksheet macro.
--
Gary''s Student - gsnu200832


"BG" wrote:

I have a spreadsheet and I want to sort rows and columns automatically as I
enter data into blank cells. What is the best way to do this?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Sorting Rows/Columns Automatically

Hi,

Here is sample code for a change event:


Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("A1"))
If Not isect Is Nothing Then
'Your code here
End If
End Sub

If this is for sheet1 then
1. press Alt+F11
2. double click the Sheet1 object in the top left corner of the screen (the
Project window)
3. add your code.

In your case you may want to record the sort routine so you can put it into
the "your code here" location.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"BG" wrote:

I have a spreadsheet and I want to sort rows and columns automatically as I
enter data into blank cells. What is the best way to do this?

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
Sorting Rows/Columns Automatically BG Excel Worksheet Functions 1 February 10th 09 05:43 PM
Sorting Rows/Columns Automatically BG Excel Worksheet Functions 0 February 10th 09 05:08 PM
Sorting Rows/Columns Automatically BG Excel Worksheet Functions 0 February 10th 09 05:07 PM
Sorting Several Columns/Rows Automatically BG Excel Worksheet Functions 0 February 10th 09 05:05 PM
Sorting automatically by columns HumingBean Excel Discussion (Misc queries) 4 December 1st 06 10:46 AM


All times are GMT +1. The time now is 09:43 AM.

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

About Us

"It's about Microsoft Excel"