PC Review


Reply
Thread Tools Rate Thread

how do i get columns in Excell to auto-adjust

 
 
jasonprouse
Guest
Posts: n/a
 
      22nd Aug 2008
I want to be able to add an option of adjusting a spreadsheet in Excel 2003by
clicking on an arrow at the top of each column that will change the entire
sheet to fit the requested order of that specific column. For example: i have
a column in my spreadsheet that contains 5 different vendors; I have 75 rows
in this column. I want to be able to add an arrow box at the top of the
column to arrange the entire spreadsheet according to the alphabetical order
of this one column
 
Reply With Quote
 
 
 
 
Otto Moehrbach
Guest
Posts: n/a
 
      22nd Aug 2008
Jason
I don't know what you mean by this "arrow" thing. The following macro
will sort the entire range by the column you choose. You choose the column
by clicking on the header of that column. That's all that you have to do.
I assumed that row 1 is the header row, that your data goes as far down as
Column A does, and that your data is 9 columns wide. Change these things as
needed. HTH Otto
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rColA As Range
If Target.Count > 1 Then Exit Sub
If Target.Row = 1 Then
If Target.Column > Cells(1, Columns.Count).End(xlToLeft).Column Then
_
Exit Sub
Set rColA = Range("A1", Range("A" & Rows.Count).End(xlUp))
rColA.Resize(, 9).Sort Key1:=Cells(2, Target.Column), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End If
End Sub

"jasonprouse" <(E-Mail Removed)> wrote in message
news:2EFECF6F-3822-4B41-B4C9-(E-Mail Removed)...
>I want to be able to add an option of adjusting a spreadsheet in Excel
>2003by
> clicking on an arrow at the top of each column that will change the entire
> sheet to fit the requested order of that specific column. For example: i
> have
> a column in my spreadsheet that contains 5 different vendors; I have 75
> rows
> in this column. I want to be able to add an arrow box at the top of the
> column to arrange the entire spreadsheet according to the alphabetical
> order
> of this one column


 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      22nd Aug 2008
Select all columns in your range to sort.

Then Data>Sort on the column of vendors.


Gord Dibben MS Excel MVP

On Fri, 22 Aug 2008 11:38:01 -0700, jasonprouse
<(E-Mail Removed)> wrote:

>I want to be able to add an option of adjusting a spreadsheet in Excel 2003by
>clicking on an arrow at the top of each column that will change the entire
>sheet to fit the requested order of that specific column. For example: i have
>a column in my spreadsheet that contains 5 different vendors; I have 75 rows
>in this column. I want to be able to add an arrow box at the top of the
>column to arrange the entire spreadsheet according to the alphabetical order
>of this one column


 
Reply With Quote
 
Glenn
Guest
Posts: n/a
 
      22nd Aug 2008
jasonprouse wrote:
> I want to be able to add an option of adjusting a spreadsheet in Excel 2003by
> clicking on an arrow at the top of each column that will change the entire
> sheet to fit the requested order of that specific column. For example: i have
> a column in my spreadsheet that contains 5 different vendors; I have 75 rows
> in this column. I want to be able to add an arrow box at the top of the
> column to arrange the entire spreadsheet according to the alphabetical order
> of this one column


Could an AutoFilter be what you are looking for?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adjust line spacing when printing address labels in Excell ? lizreed Microsoft Excel Worksheet Functions 1 22nd Aug 2009 11:12 PM
auto locking of excell workbook (excell 2003) cheekymonkey Microsoft Excel Misc 2 14th Nov 2008 11:50 PM
excell 2003 -how to use a scroll bar to adjust the range of a func tom Microsoft Excel Misc 2 17th Aug 2008 01:54 PM
How do I auto adjust row height on merged columns w/wrapped text? =?Utf-8?B?RXhjZWxCZWU=?= Microsoft Excel Misc 2 17th Nov 2006 04:48 AM
auto adjust columns in a pivot =?Utf-8?B?amVubg==?= Microsoft Excel Worksheet Functions 0 9th Aug 2005 07:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:11 PM.