d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Excel Help Please > Will Tip
Add Reply New Topic New Poll
Member
Posts: 6,091
Joined: Nov 25 2008
Gold: 0.00
Jun 27 2015 10:42pm
i am using filtering and in columns J and K it works properly.

column J is interpreted as numbers and filtering allows me to sort numerically
column K is interpreted as text and allows me to sort alphabetically

column L is sorted as text and is not sorted as numbers like I need it to be (as we can tell, the numbers are left-aligned and not right aligned; i think this is being caused by the hyphens and the + signs)

all of the cell types are general and i have tried changing the cell types to everything, but nothing works. the only way for me to get the filtering to work properly in L is to remove all of the hyphens, but i need them

this is causing me problems, as seen in the ss, filtering is not properly ordering the list and the ranges are not in numerical order

is there any way i can fix this? any help appreciated


Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jun 28 2015 05:12am
obviously it will not be treated as a number if it's not a number (eg: hyphen)

you need to rewrite your text so that text sort is the same as numerical sort. text sort looks at each character from left to right. hence 181 comes before 31. that means making the first number 3 digits long. instead of 31 make it 031 so that 031 comes before 181

if you don't want to see 3 digits long, then you need to create a separate column where it is 3 digits long (or otherwise sorted correctly), sort by that column, and hide it from the output.

This post was edited by carteblanche on Jun 28 2015 05:14am
Member
Posts: 6,091
Joined: Nov 25 2008
Gold: 0.00
Jun 28 2015 11:08am
Quote (carteblanche @ Jun 28 2015 03:12am)
obviously it will not be treated as a number if it's not a number (eg: hyphen)

you need to rewrite your text so that text sort is the same as numerical sort. text sort looks at each character from left to right. hence 181 comes before 31. that means making the first number 3 digits long. instead of 31 make it 031 so that 031 comes before 181

if you don't want to see 3 digits long, then you need to create a separate column where it is 3 digits long (or otherwise sorted correctly), sort by that column, and hide it from the output.



wow thanks for your help man, so just to be clear, i can't make the filter recognize these values as numbers because they have hyphens. is that correct?

so my only two solutions are the ones you've stated if i am not able to remove the hyphens, right?
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jun 28 2015 11:15am
Quote (frigidheart @ Jun 28 2015 01:08pm)
wow thanks for your help man, so just to be clear, i can't make the filter recognize these values as numbers because they have hyphens. is that correct?

so my only two solutions are the ones you've stated if i am not able to remove the hyphens, right?


i am not an excel expert. i have no idea what other solutions are available. this is the only solution i'm familiar with. perhaps you can override the filter with your own macro or some shit. i have no idea.

and to be clear, you can't make the filter recognize them as numbers because they're not numbers. it could be because you added a hyphen or ampersand or picture of megan fox. if it's not a number, it will not be treated as a number.

This post was edited by carteblanche on Jun 28 2015 11:17am
Member
Posts: 6,091
Joined: Nov 25 2008
Gold: 0.00
Jun 28 2015 11:18am
Quote (carteblanche @ Jun 28 2015 09:15am)
i am not an excel expert. i have no idea what other solutions are available. this is the only solution i'm familiar with. perhaps you can override the filter with your own macro or some shit. i have no idea.

and to be clear, you can't make the filter recognize them as numbers because they're not numbers. it could be because you added a hyphen or ampersand or picture of megan fox. if it's not a number, it will not be treated as a number.


sort by that column, and hide it from the output.

okay thanks, can you explain what you mean by hide it from the output?
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jun 28 2015 11:21am
Quote (frigidheart @ Jun 28 2015 01:18pm)
sort by that column, and hide it from the output.

okay thanks, can you explain what you mean by hide it from the output?


i haven't used excel in years, so i couldnt test it for you. i think you can right click a column and there's a "hide" option? or maybe it's in a menu somewhere. if you can't figure it out, put it in column z or somewhere you won't look.
Go Back To Homework Help Topic List
Add Reply New Topic New Poll