Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 132
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default 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   Report Post  
Senior Member
 
Location: Hyderabad
Posts: 237
Thumbs up

Quote:
Originally Posted by NicoleS View Post
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
if you are familar with vba try this

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
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 characters, ignoring numbers Barto9729 Excel Worksheet Functions 7 September 25th 13 07:08 PM
Sorting Columns by number of characters NicoleS Excel Discussion (Misc queries) 1 May 5th 10 10:35 PM
Sorting on only certain characters in a cell Lesa Excel Worksheet Functions 3 November 25th 08 07:32 PM
Ignoring characters when sorting amy153 Excel Discussion (Misc queries) 0 February 14th 06 09:20 PM
Sorting by Number of Characters cny2 Excel Discussion (Misc queries) 3 July 28th 05 04:40 PM


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