Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sorting by number of characters
I am using Excel 2007
(thought I posted this earlier, but can't find it - even with google group search). I need to sort an inventory list according to the number of characters in the item number (not by numerals). Is this possible? Thanks! Nicole |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sorting by number of characters
May be this...
=LEN(A1) Change the A1 to your Item Number Cell. Remember to Click Yes, if this post helps! -------------------- (Ms-Exl-Learner) -------------------- "NicoleS" wrote: I am using Excel 2007 (thought I posted this earlier, but can't find it - even with google group search). I need to sort an inventory list according to the number of characters in the item number (not by numerals). Is this possible? Thanks! Nicole |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sorting by number of characters
In a spare column you can put this on row 2:
=LEN(A2) and copy down. Include this column within the sort area, and sort on this new column. Hope this helps. Pete On May 13, 5:51*pm, NicoleS wrote: I am using Excel 2007 (thought I posted this earlier, but can't find it - even with google group search). I need to sort an inventory list according to the number of characters in the item number (not by numerals). Is this possible? Thanks! Nicole |
#4
|
|||
|
|||
Quote:
Sub SortByLength() Range("A:A").EntireColumn.Insert With Range("B2", Cells(Rows.Count, "B").End(xlUp)).Offset(0, -1) .FormulaR1C1 = "=LEN(RC[1])" .Value = .Value End With Range("A2", Cells(Rows.Count, "B").End(xlUp)).Sort _ Key1:=Range("B2"), Order1:=xlDescending, Header:=xlYes Range("A:A").EntireColumn.Delete End Sub
__________________
Thanks Bala |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sorting characters, ignoring numbers | Excel Worksheet Functions | |||
Sorting Columns by number of characters | Excel Discussion (Misc queries) | |||
Sorting on only certain characters in a cell | Excel Worksheet Functions | |||
Ignoring characters when sorting | Excel Discussion (Misc queries) | |||
Sorting by Number of Characters | Excel Discussion (Misc queries) |