Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jay Fincannon
 
Posts: n/a
Default Sorting with underlying formulas.

I want to sort a column based on the displayed data not the underlying
formula. Can this be done?

cell formula =VLOOKUP(A1,RteTable,2,False)
The resulting cell display would be either North, South, East, West
or OSA

Jay
  #2   Report Post  
Max
 
Posts: n/a
Default

Think it's not possible unless you kill the formulas in the col
with an in-place: copy paste special values OK

Perhaps try a workaround to get the sorted list up
dynamically in another sheet(s) ?

Assume a sample table below
in Sheet1, cols A and B,
data from row1 down

1 North
2 South
5 OSA
4 West
3 East

where col B contains your formula, i.e.:
In B1 is : =VLOOKUP(A1,RteTable,2,FALSE), copied down

Use an empty column to the right, say col D?

Put in D1: =IF(A1="","",CODE(LEFT(B1,1))+ROW()/10^10)

Copy D1 down to say D100, to cover the max expected
number of rows of data in cols A and B
(can copy down ahead of expected data input in col A)

Col D will function as an arbitrary "alpha-numbering cum tie-breaker"
criteria column to enable extraction of the sort by col B in the other
sheet(s)

In Sheet2
-------------

Put in A1:

=IF(ISERROR(SMALL(Sheet1!$D:$D,ROWS($A$1:A1))),"", INDEX(Sheet1!A:A,MATCH(SMA
LL(Sheet1!$D:$D,ROWS($A$1:A1)),Sheet1!$D:$D,0)))

Copy A1 across to B1, fill down to B100, i.e. by the same number of rows
that was catered for in Sheet1

For the sample data in Sheet1, you'll get the table below,
sorted in ascending order by col B in Sheet1:

3 East
1 North
5 OSA
2 South
4 West

And if you want to sort in descending order, just change the SMALL in the
formula to LARGE, viz., put instead in A1:
(you could try this in another Sheet3, for example)

=IF(ISERROR(LARGE(Sheet1!$D:$D,ROWS($A$1:A1))),"", INDEX(Sheet1!A:A,MATCH(LAR
GE(Sheet1!$D:$D,ROWS($A$1:A1)),Sheet1!$D:$D,0)))

Then just copy across and fill down as before

You'll get (in Sheet3):

4 West
2 South
5 OSA
1 North
3 East
< rest are blanks: ""

The sorted lists in Sheets 2 and 3 will change accordingly depending on the
results returned in col B in the source table in Sheet1
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Jay Fincannon" wrote in message
...
I want to sort a column based on the displayed data not the underlying
formula. Can this be done?

cell formula =VLOOKUP(A1,RteTable,2,False)
The resulting cell display would be either North, South, East, West
or OSA

Jay



  #3   Report Post  
Jay Fincannon
 
Posts: n/a
Default

Thanks Max. Where's that Jambi?

Think it's not possible unless you kill the formulas in the col
with an in-place: copy paste special values OK

Perhaps try a workaround to get the sorted list up
dynamically in another sheet(s) ?

Assume a sample table below
in Sheet1, cols A and B,
data from row1 down

1 North
2 South
5 OSA
4 West
3 East

where col B contains your formula, i.e.:
In B1 is : =VLOOKUP(A1,RteTable,2,FALSE), copied down

Use an empty column to the right, say col D?

Put in D1: =IF(A1="","",CODE(LEFT(B1,1))+ROW()/10^10)

Copy D1 down to say D100, to cover the max expected
number of rows of data in cols A and B
(can copy down ahead of expected data input in col A)

Col D will function as an arbitrary "alpha-numbering cum tie-breaker"
criteria column to enable extraction of the sort by col B in the other
sheet(s)

In Sheet2
-------------

Put in A1:

=IF(ISERROR(SMALL(Sheet1!$D:$D,ROWS($A$1:A1))),"" ,INDEX(Sheet1!A:A,MATCH(SMA
LL(Sheet1!$D:$D,ROWS($A$1:A1)),Sheet1!$D:$D,0)) )

Copy A1 across to B1, fill down to B100, i.e. by the same number of rows
that was catered for in Sheet1

For the sample data in Sheet1, you'll get the table below,
sorted in ascending order by col B in Sheet1:

3 East
1 North
5 OSA
2 South
4 West

And if you want to sort in descending order, just change the SMALL in the
formula to LARGE, viz., put instead in A1:
(you could try this in another Sheet3, for example)

=IF(ISERROR(LARGE(Sheet1!$D:$D,ROWS($A$1:A1))),"" ,INDEX(Sheet1!A:A,MATCH(LAR
GE(Sheet1!$D:$D,ROWS($A$1:A1)),Sheet1!$D:$D,0)) )

Then just copy across and fill down as before

You'll get (in Sheet3):

4 West
2 South
5 OSA
1 North
3 East
< rest are blanks: ""

The sorted lists in Sheets 2 and 3 will change accordingly depending on the
results returned in col B in the source table in Sheet1


  #4   Report Post  
Max
 
Posts: n/a
Default

You're welcome, Jay !

btw, what's Where's that Jambi?

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Jay Fincannon" wrote in message
...
Thanks Max. Where's that Jambi?



  #5   Report Post  
Max
 
Posts: n/a
Default

btw, what's Where's that Jambi?

one guess .. :
1° 22' N 103° 45' E = Singapore

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




  #6   Report Post  
Jay Fincannon
 
Posts: n/a
Default

I mistakenly looked at 1*22' S instead of N

Jay
GMT -5 34°0N 84°38'W


btw, what's Where's that Jambi?


one guess .. :
1° 22' N 103° 45' E = Singapore


  #7   Report Post  
Max
 
Posts: n/a
Default

"Jay Fincannon" wrote :
....
GMT -5 34°0N 84°38'W


Near Dalton, Georgia, USA ?

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #8   Report Post  
Jay Fincannon
 
Posts: n/a
Default

Almost; Kennesaw, GA

"Jay Fincannon" wrote :
...
GMT -5 34°0N 84°38'W


Near Dalton, Georgia, USA ?


  #9   Report Post  
Max
 
Posts: n/a
Default

Almost; Kennesaw, GA
GMT -5 34°0N 84°38'W


Thanks, the guess wasn't that far off then <g
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


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
Extend data range format and formulas Larry F Excel Worksheet Functions 4 February 2nd 05 06:46 AM
Formulas not working John Lovin Excel Discussion (Misc queries) 3 January 18th 05 10:50 PM
How to make Excel run limited number of formulas on a given worksh John Excel Discussion (Misc queries) 0 January 12th 05 04:29 PM
Way to make Excel only run certain formulas on a worksheet? jrusso Excel Discussion (Misc queries) 0 January 12th 05 04:23 PM
calculating formulas for all workbooks in a folder Chad Excel Worksheet Functions 3 November 13th 04 05:22 PM


All times are GMT +1. The time now is 01:51 PM.

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"