Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Sorting a column to use with an INDEX function

One way would be to use a couple of helper columns as you suggest. If the
format is always nnnnX, then you could use

=IF(ISNUMBER(--RIGHT(A1)),A1,--LEFT(A1,LEN(A1)-1))

and

=IF(ISNUMBER(--RIGHT(A1)),"",RIGHT(A1))

If it could be more complex, use

=LOOKUP(9.99999999999999E+307,--MID(G1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},G1&"
0123456789")),ROW(INDIRECT("1:"&LEN(G1)))))

and

=SUBSTITUTE(A1,B1,"")


and then sort by these two helper columns.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"macshimi" wrote in message
...
I have posted a couple of questions concerning looking up an Employee ID

and
then a pay increase date, Bob Phillips supplied this formula :

=INDEX($C$1:$C$21,MATCH(MAX(IF(($A$1:$A$21="764753 M")*$B$1:$B$21<E1),$B$1:$B
$21)),$B$1:$B$21,0)).

My problem is with the employee ID column (A) which is a mixture of

numeric
and alpha-numeric, you can get 765132 and 765132B.

My question is, how do I sort this column, should I convert the numerics

to
text, or split column into two A & B with A holding the numerica nad B the
Alpha characters.

If the latter, how must the formula be changed to look for the Employee ID
split into two?



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
Need a function to fill column from other columns G Miller Excel Worksheet Functions 5 December 2nd 05 07:35 PM
Can the column index in a cell address be made variable? cyberdude Excel Discussion (Misc queries) 1 November 20th 05 02:47 AM
IF/AND/OR/DATEIF Issue...sorry...long post... EDSTAFF Excel Worksheet Functions 1 November 10th 05 12:28 AM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
How to automatically number an index column Phil Excel Worksheet Functions 13 October 25th 05 01:36 PM


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

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

About Us

"It's about Microsoft Excel"