Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Automatic Numbering

I use an excel spreadsheet to prioritise tasks during my work day.

Sometimes I change the priority of my tasks (I have a separate column for
the priority number).

As it stands, whenever I change a number, e.g. priority 2 to priority 4 - I
have to then go and re-number every other task on my list.

Is there a way of automatically changing the numbers so that I don't have to
manually do this?

If there is a formula you could give me, that would be fantastic. Thanks so
much!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Automatic Numbering

Hi Jodi

I can't think of a way to do it by formula, but the following macro might
help

Sub SortTasks()
Dim lr As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
Columns("A:B").Sort Key1:=Range("B1"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("B1") = 1: Range("B2") = 2
Range("B1:B2").AutoFill Destination:=Range("B1:B" & lr)
End Sub

To insert the macro into your workbook.
Alt+F11 to invoke the VB Editor
InsertModule
Copy code above and Paste into white pane that appears
Alt+F11 to return to Excel

To use
Alt+F8 to bring up list of Macros
Highlight SortTasksRun

You could give it a shortcut key if you wanted.
ToolsMacroshighlight SortTasksOptionsenter a letter in the box to be
used in conjunction with Control, say qOK
Now when you want to run the macro, just type Control+q and it will run.

--
Regards
Roger Govier

"Jodi" wrote in message
...
I use an excel spreadsheet to prioritise tasks during my work day.

Sometimes I change the priority of my tasks (I have a separate column for
the priority number).

As it stands, whenever I change a number, e.g. priority 2 to priority 4 -
I
have to then go and re-number every other task on my list.

Is there a way of automatically changing the numbers so that I don't have
to
manually do this?

If there is a formula you could give me, that would be fantastic. Thanks
so
much!


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
Automatic numbering jennjenn Excel Discussion (Misc queries) 1 August 28th 07 08:42 PM
Automatic Numbering Fortune Excel Worksheet Functions 1 January 22nd 07 03:14 PM
Automatic Numbering Javster95 Excel Discussion (Misc queries) 5 May 1st 05 07:30 PM
Automatic Numbering. Javster95 Excel Discussion (Misc queries) 0 April 30th 05 07:37 PM
automatic numbering nicola Excel Discussion (Misc queries) 1 November 29th 04 02:01 PM


All times are GMT +1. The time now is 03:55 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"