Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 129
Default Sorting with Column has Formula

Hi everyone,

I never imagined that the formula in the column would affect the sorting
order in any way, but it does in my case.

Below is the formula in that I have in Col I, and I'd like to sort it in
Ascending order, but the result is that it sorts with all the empty rows on
top and the one with the result from the formula at the bottom. I assume it
consider the "I" in the "IF" function in the formula, but I'm not sure.

Can anyone tell me how to fix this please?

=IF(E2="","",IF(J2="X","Priority
#1",IF(ISNA(VLOOKUP(E2,PriorityList,4,0)),"No Priority
Found",VLOOKUP(E2,PriorityList,4,FALSE))))

Thank you very much,
Neon520

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Sorting with Column has Formula

There's a difference between the way excel sees really empty cells and formulas
that evaluate to an empty string.

Numbers, then strings, then empties.

And the string ="" pops to the top of the strings.

Maybe you can modify your formula to return a different value:
=if(e2="",rept("z",99),...

or even fill in the truly empty cells with formulas (="").

Neon520 wrote:

Hi everyone,

I never imagined that the formula in the column would affect the sorting
order in any way, but it does in my case.

Below is the formula in that I have in Col I, and I'd like to sort it in
Ascending order, but the result is that it sorts with all the empty rows on
top and the one with the result from the formula at the bottom. I assume it
consider the "I" in the "IF" function in the formula, but I'm not sure.

Can anyone tell me how to fix this please?

=IF(E2="","",IF(J2="X","Priority
#1",IF(ISNA(VLOOKUP(E2,PriorityList,4,0)),"No Priority
Found",VLOOKUP(E2,PriorityList,4,FALSE))))

Thank you very much,
Neon520


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 129
Default Sorting with Column has Formula

Hi Dave,

Your suggestion sounds fair, except that I don't want Col I to have anything
if Col E is empty.
I understand that by putting zzzzzz at if the evaluation is true, it will
sort those records to the bottom of the list, but it wouldn't be pleasant to
have it viewed that way.

Is there anything I should change in my function to make this work?

Maybe instead of putting "" if the evaluation is true, I should put
something else?

Thank you,
Neon520

"Dave Peterson" wrote:

There's a difference between the way excel sees really empty cells and formulas
that evaluate to an empty string.

Numbers, then strings, then empties.

And the string ="" pops to the top of the strings.

Maybe you can modify your formula to return a different value:
=if(e2="",rept("z",99),...

or even fill in the truly empty cells with formulas (="").

Neon520 wrote:

Hi everyone,

I never imagined that the formula in the column would affect the sorting
order in any way, but it does in my case.

Below is the formula in that I have in Col I, and I'd like to sort it in
Ascending order, but the result is that it sorts with all the empty rows on
top and the one with the result from the formula at the bottom. I assume it
consider the "I" in the "IF" function in the formula, but I'm not sure.

Can anyone tell me how to fix this please?

=IF(E2="","",IF(J2="X","Priority
#1",IF(ISNA(VLOOKUP(E2,PriorityList,4,0)),"No Priority
Found",VLOOKUP(E2,PriorityList,4,FALSE))))

Thank you very much,
Neon520


--

Dave Peterson
.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Sorting with Column has Formula

Or use another column:

=if(cellwithformula="",rept("z",255),cellwithformu la)

like:
=if(x2="",rept("z",255),x99)
and drag down

Then sort the entire range by this column.

You could hide or delete the column when you're done.

Neon520 wrote:

Hi Dave,

Your suggestion sounds fair, except that I don't want Col I to have anything
if Col E is empty.
I understand that by putting zzzzzz at if the evaluation is true, it will
sort those records to the bottom of the list, but it wouldn't be pleasant to
have it viewed that way.

Is there anything I should change in my function to make this work?

Maybe instead of putting "" if the evaluation is true, I should put
something else?

Thank you,
Neon520

"Dave Peterson" wrote:

There's a difference between the way excel sees really empty cells and formulas
that evaluate to an empty string.

Numbers, then strings, then empties.

And the string ="" pops to the top of the strings.

Maybe you can modify your formula to return a different value:
=if(e2="",rept("z",99),...

or even fill in the truly empty cells with formulas (="").

Neon520 wrote:

Hi everyone,

I never imagined that the formula in the column would affect the sorting
order in any way, but it does in my case.

Below is the formula in that I have in Col I, and I'd like to sort it in
Ascending order, but the result is that it sorts with all the empty rows on
top and the one with the result from the formula at the bottom. I assume it
consider the "I" in the "IF" function in the formula, but I'm not sure.

Can anyone tell me how to fix this please?

=IF(E2="","",IF(J2="X","Priority
#1",IF(ISNA(VLOOKUP(E2,PriorityList,4,0)),"No Priority
Found",VLOOKUP(E2,PriorityList,4,FALSE))))

Thank you very much,
Neon520


--

Dave Peterson
.


--

Dave Peterson
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 a Pivot Table Column that is not the first column... [email protected] Excel Worksheet Functions 1 October 10th 07 09:02 PM
Column sorting ukyob Excel Discussion (Misc queries) 3 August 3rd 06 07:16 PM
How do I limit sorting a column to the column? Pat Excel Worksheet Functions 0 February 9th 06 04:01 PM
Sorting 1 column into two jimF Excel Discussion (Misc queries) 5 February 1st 06 05:39 PM
Right column doesn't change when sorting left column. nohope Excel Discussion (Misc queries) 2 July 19th 05 03:27 PM


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