Is there a built-in or free qsort for CList like there is for CArray?
Sorting a CList has its problems. If it isn't terribly large, you could always write a
bubble-sort (N**2 sort) and just swap list item positions. For large lists, this can take
minutes, which is not acceptable. What I have done in the past is create a CArray of
pointers (where my CLIst is also a list of pointers; this makes it easy), and do something
of the form, where CMyList is a subclass of CList<T, T>, where T is a pointer type. I';m
doing this from memroy, and I don't often do templated subclasses, ...Sorting #31
How do I sort a sheet (say 10 rows of 5 columns) into 1 row of 50 columns,
where each 5 columns in the new single row is made up of the successive rows
of 5 columns of the original data? I don't want to cut and paste.
Sorry. sort doesn't work that way.
you can do with copy paste special tranpose
it would take you 5 pastes.
assuming your date is at A1:E10, copy the a column then
select end of data at row 1. goto edit>paste special>
repeat for the other 4 columns.
>How do I sort a sheet (...sorting problem #6
I know sorting puts all true blank cells go to the bottom of the list.
My question is:
Is it possible to make blank cells caused by formulae such as
IF(logical_test,value_if_true,"") also do the same?
On Oct 16, 6:03 am, Yongguang....@gmail.com wrote:
> I know sorting puts all true blank cells go to the bottom of the list.
> My question is:
> Is it possible to make blank cells caused by formulae such as
> IF(logical_test,value_if_true,"") also do the same?
One way is to sort the column in descending order first. This puts all
non-blanks at the top but in reve...How do I sort four columns
Can I, and if so how do I sort 4 colums at the same time in Excel?
first sort your data with the 4th column and after this sort your data
with the remaining 3 columns
> Can I, and if so how do I sort 4 colums at the same time in Excel?
...How to check for numbers in ascending order?
I have a dataset coming back from an application screen where I have
to check that the values in
a set of fields are in ascending order. Is there an easy way to do
this in SQL?
I've written the following code using a WHILE loop (which works), but
wondered if there was a better way
of doing this i.e. using a CTE or similar?
Here's the temp table that I've created to hold the values with an
added row number:
row_number row_id entry_value
1 101965 23000.00
2 101966 24000.00
3 101967 22000.00
how can after the use of autofilter, with code, to sort asc. the remain
Don't know if you followed up on reply in programming or not,
but your question is not clear, and you should be posting to
only one newsgroup. Since you mention code you obviously
expect a programming solution and should stick to the
excel.programming newsgroup For What it is worth, the
same people visit
excel.misc, excel, programming, exce.worksheet.functions
and may also visit some more specialized newsgroups.
David McRitchie, Microsoft MVP - Excel [sit...Query Ascending Question
In a Ascending order on a query how can I get the blanks to come last, now
its ordering blanks first then a,b,c,...Thanks for your help...Bob
ORDER BY [SomeColumn] Is Null, SomeColumn;
Where 'SomeTable is the name of your table and 'SomeColumn' is the name of
the column on which you want to sort.
"Bob" <firstname.lastname@example.org> wrote in message news:email@example.com...
> In a Ascending order on a query how can I get the blanks to come last, now
> its ordering blanks first th...include LISTNUM in style definition?
Is there any way to create a styled paragraph that allows you to include a
LISTNUM field code inside the style definition to do simple numbering,
therefore, avoiding Word 2007's built-in numbering? If so how?
No, that isn't possible.
However, you can create an AutoText entry (Building Block) that inserts a
field. For simple numbering, I'd use a SEQ field.
Microsoft Word MVP
"cayce" <firstname.lastname@example.org> wrote in message
> Is there any way to create a s...Row names will not move with sort
Each row in my summary table in Sheet1 is hyperlinked to a corresponding table in Sheet2 with additional details.
I need to move the rows in my summary table (Sheet1) and preserve the links to and from the details tables (Sheet2).
I found that I can move rows in Sheet1 with cut & insert and the hyperlinks are maintained. I can travel from a row in summary table (Sheet1) to details table (Sheet2) and back, even after the corresponding row (Sheet1) was moved.
But if I sort the rows in Sheet1 the links from Sheet2 back to corresponding rows in Sheet1 lead to presorted locations. Apparen...sorts not sorting
OK- Thanks to everyones help I now i have a list i can work with... but
there are a few problems.... the zips are all 5 digit and now i have to
sort them... the problem is, THEY WONT SORT CORRECTLY!!!!!!! The
numbers are not in order... some are but a lot are not... is there
anyway to fix this???? i need to sort them by zip code but cant seem to
get them to do it correctly.. any ideas???
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/
You are going to be far better of...import- number- sort?
I imported this data into a spread sheet- I tried to format it to number,
but when I sort it- I get :
Whats up with this?
Install the TrimAll macro, select the column and invoke
the macro from Alt+F8
Directions to install and use a macro at
I expect that you have spaces or CHAR(128) "Required Blank"
characters in you data you can check is =LEN(A1)
David...sorting macro #3
I need to sort on 8 cells in a row and on 1500+rows. I can do it one at a
time but I know there must be an easier way. Can ANYONE HELP?
C3:J3 I need these cells sorted and then down to C1532:J1532
I did create a macro to sort after I selected them but still one at a time.
Does it have to be a macro? I can edit a macro but don't really know how to
Yes, it has to be a macro. The following should do it. This macro loops
through all the entries in Column C, and in each row it sorts the values in
Columns C:J. HTH Otto
Dim rColC As Range
Dim i As...Report Writer Sorting
Is it possible to sort a report by a calculated field? I dont see this
available in RW but I could be looking in the wrong area.
No, you can only sort by the fields available in the tables.
Neither can you create a restriction that uses a calculated field.
Depending on why you are sorting, try using Smartlist to display the data in
order you want.
"Theo" <Theo@discussions.microsoft.com> wrote in message
> Is it possible to sort a report by a calculated field? I dont see this
>...Is autofilter & sort disabled in protected cells?
My spreadsheet is protected, but I have checked off the boxes to allow users
to use autofilter & sort, but since my cells are protected (because I don't
want anybody to change any records in the document) the autofilter sort
feature does not work. Is there any way around this? Thanks.
If you apply AutoFilter to the sheet before protecting it (and check the 'use
autofilter' option), AutoFilter will work on the protected sheet. Excel will
never sort locked cells, even if you checked the 'sort' option when you
protected the sheet. The two alternatives usual...Pivot Table Ascending Order of Row Field
I have a Pivot Table with the Row Field populated with Client codes (ABC).
When I manually set the Feild Settings of the Row Data to Ascending I get the
following order below. Note the first code is out of order. When I put it
in decsending order I get the reverse order with the code JFM last in order.
Whey is this?
Do you have a Custom list with JFM as one of the entries (Tools>Options,
> I have a Pivot Table with the Row Field populated with Client c...sorting out duplicate data of slight variation
in a school district volunteer effort, i have a need to
sort out rows of data which are duplicates of other rows
of data yet some fields contain different data.
columns: first name, last name, address
rows contain data like below:
susan, smith, 1440 wallaby way
joe, smith, 1440 wallaby way
bart, smith, 200 kings court
i need to keep susan or joe but not both.
You can use a filter, but I expect your initial goal is to identify
them and chose one of them at the primary one to keep.
Chip Pearson has a rather complete collection of dealing
...query sort on date
I've got a table where applicant data is entered (via a form) everytime an
application is submitted. Each time a person submits an application it is
enteed as a new submission, thus I can have duplicate records on a person,
except for the submission date and maybe the address if it changed but it is
still a new record.
My questions are how can I query the table data to only show the most recent
applications without having duplicate records on a person? Another field in
the table is the SSN.
The other question pertaining to the same query is say that an application
was submit...using combo boxes to sort
I need to make a spreadsheet for work with several fields. I have inserted
combo boxes into certain columns (last name, first name) so that data can be
easily found. The problem that I am running into is that when I choose let's
say a last name, it separates from the rest of the data but the rest of the
row (first name, date of birth, etc) stays in the original spot. How do I
make it so that I can find data in one column but have all the information in
that row move? I have also seen charts where when the requested data comes up
the rest of the data "hides." If anyone know...Sorting a list of UK Postal codes in Excel 2003
Hi, I am relatively new to Excel and am using the 2003 version. I am
currently learning about lists. I have compiled a list of personal
data with names and addresses. I have put the Postal Codes in a
When I sort the list in ascending order by Postal code I get e.g the
Can anyone please advise how I can sort SA5,SA6 and SA7 to come before
SA11 and SA12 in the list.
Add another column and use a formula like this to convert the 3 digit
entries to 4 digit entries. Then sort on the new column.
= if(len(A1) = 3, left(A1,2) &...definition of "series" in XL
I am having trouble in Microsoft XL because I can't get a handle on exactly
what a data series is. This leads to serious trouble clearly labeling
charts. If a series is in rows or columns, does that mean the data is read
down the rows or down the columns? It seems to be the opposite of what is
intuitive when I actually try it.
I wonder if anybody else is as dumb as I am?
is this the same question as the one you asked in
microsoft.public.excel.misc on the charts? if so i attempted to answer it
one thing i didn't mention there was when you choose "rows...Ascending Numbers
Does anyone know how to create index cards that are numbered, with the
numbers ascending for each and every card?
Mary Sauer MSFT MVP
"Rachel" <Rachel@discussions.microsoft.com> wrote in message
> Does anyone know how to create index cards that are numbered, with the
> numbers ascending for each and every card?
> Ta Muchly
...How do I subtotal data and then sort these subtotals in ascending.
personally i would sort the data by the category on which to subtotal
then subtotal it (data / subtotals)
then collapse it down so i could only see the subtotal lines
choose edit / goto / special - visible cells only
go to a new sheet & paste
then sort that list.
hope this helps
"Steve_Wood" <Steve_Wood@discussions.microsoft.com> wrote in message
Just hide the details and sort the visible cells.
when you show the details, you'll be amazed (I was!) that exce...How might one serialize a sorted dictionary?
given a sorted dictionary of sorted dictionaries
Private m_profilesDict As Dictionary(Of String, Object) = New Dictionary(Of
If m_profilesDict.ContainsKey(ProfileName) Then
ProfileDict = m_profilesDict.Item(ProfileName)
ProfileDict = New SortedDictionary(Of Double, String)
If ProfileDict.ContainsKey(dlength) Then
ProfileDict.Add(dlength, "to be determined")
so at runtime i might have
ProfileDict.Item("25").Value = &quo...Sorting rows horizontally
I have a medium sized data base, organized as shown below:
Column A Column B Column C Column D Column E
Success % 85 80 75 77
Price 1.25 1.10 2.18 1.50
Yield rate 150 140 145 148
I'm looking for a formula or routine that will
sequentially arrange the values of each row from low to
high, leaving the labels in column A untouched
If I understand what you're asking, you -*don't* want to keep the columns
The 85 and 1.25 and 150 are separate entities and *not...Sorting columns.
I have a spreadsheet with about 300 tabs. Some have data in Column A
only, some have data in Column A through Column IV. I want to have a Macro
that will go through each tab and move everything into Column A on that tab.
So, any data in Column B gets moved underneath the data in Column A. Then
any data in Column C will be moved underneath the data from Column A and
Column B, in Column A, etc.
Then, I'd like the macro to delete any blank lines on each tab. (There will
be lots of them).
I've tried to do this but my way has created a macro that is now a over a