Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Sort by column problems


I cannot figure how to sort column with data in them.

My problem is somewhat unique. I have two sets of data, each set
containing the same 12 column names and each set on a different
worksheet. One set are sales figures the company headquarters uses to
reconcile against the other set which is from the point-of-sale store.
Each set contains well over 5500 lines, each representing a sale.

The column I am trying to sort the information by is a column titled
"Auth Num" and is basically a receipt number and is the only truly
unique identifier from each sale. The other columns are not truly
unique as there are many sales on the same date, by the same company,
same company identifier, same location, same amount, etc. and cannot
easily be sorted and used individually to identify each sale.

Now here's the problem.

The data set for column "Auth Num" which the company headquarters has
contains the entire reciept number which is 9 digits. The other data
set from the company store is the same receipt number but only contains
the LAST 6 digits of the receipt. That is the headquarter's data would
look like

438568238

whereas the data set from the company store would look like

568238

which is the receipt number but only the last six digits.

When I do a Data/Sort I first sort by Date, then by fuel amount, then
by Auth Num. This is the best way I can get the data into any sort of
comparable format. When I try to sort by that method and then compare
worksheets the a few receipt numbers are usually off by a line or two,
i.e. a particular transaction will be on line 264 on one worksheet but
will be on line 266 on the other worksheet.

Since the worksheets are out of sync by only a line or two I can still
compare but it's long and time-consuming. I have to look at each
transaction and see if the total matches from one set of data to
another. The transactions are usually in an order where both
worksheets are off but only by a line or two. If they are in decent
order I can go down about 100 transactions to see if they are still in
decent order but if they don't I usually have to delete a transaction
to get both lists into sync, i.e. the same transaction on the same line
number.

Is there any way I can delete the first three numbers for the receipt
for the headquarter's data? Is there any way I could sort that column
from right to left? If I could accurately sort by Auth Num that would
practically do the job itself, after all that's what Excel is for
right?




--
OfficeNDN
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Sort by column problems

Hi
My quick solution
Create another column alongside the 9 digit receipt no (I assume it is a
number and not text) and if your receipt no was in B4 then the formula to put
in C4 is
=((B4/100000)-TRUNC((B4/1000000)*100000

This will remove the excess
Now you can combine and sort. (In the second set I suggest you create a
similar column and copy the existing numbers so that you actually sort on the
new column.

This is probably not the most elegant solution but it does work.
--
Don C


"OfficeNDN" wrote:


I cannot figure how to sort column with data in them.

My problem is somewhat unique. I have two sets of data, each set
containing the same 12 column names and each set on a different
worksheet. One set are sales figures the company headquarters uses to
reconcile against the other set which is from the point-of-sale store.
Each set contains well over 5500 lines, each representing a sale.

The column I am trying to sort the information by is a column titled
"Auth Num" and is basically a receipt number and is the only truly
unique identifier from each sale. The other columns are not truly
unique as there are many sales on the same date, by the same company,
same company identifier, same location, same amount, etc. and cannot
easily be sorted and used individually to identify each sale.

Now here's the problem.

The data set for column "Auth Num" which the company headquarters has
contains the entire reciept number which is 9 digits. The other data
set from the company store is the same receipt number but only contains
the LAST 6 digits of the receipt. That is the headquarter's data would
look like

438568238

whereas the data set from the company store would look like

568238

which is the receipt number but only the last six digits.

When I do a Data/Sort I first sort by Date, then by fuel amount, then
by Auth Num. This is the best way I can get the data into any sort of
comparable format. When I try to sort by that method and then compare
worksheets the a few receipt numbers are usually off by a line or two,
i.e. a particular transaction will be on line 264 on one worksheet but
will be on line 266 on the other worksheet.

Since the worksheets are out of sync by only a line or two I can still
compare but it's long and time-consuming. I have to look at each
transaction and see if the total matches from one set of data to
another. The transactions are usually in an order where both
worksheets are off but only by a line or two. If they are in decent
order I can go down about 100 transactions to see if they are still in
decent order but if they don't I usually have to delete a transaction
to get both lists into sync, i.e. the same transaction on the same line
number.

Is there any way I can delete the first three numbers for the receipt
for the headquarter's data? Is there any way I could sort that column
from right to left? If I could accurately sort by Auth Num that would
practically do the job itself, after all that's what Excel is for
right?




--
OfficeNDN

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 860
Default Sort by column problems

Hi OfficeNDN,

Insert a helper column next to your 9 digit number. Say the 9 digit
column starts in B2 then in C2(which is your helper column) put
this formula =RIGHT(B2,6) and copy down as far as needed.
You now have two identical columns to sort on.

HTH
Martin


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
How do I sort by row instead of by column? PercivalMound Excel Worksheet Functions 7 August 28th 06 10:41 PM
prevent column from being included in sort in Excel jannkatt Excel Discussion (Misc queries) 0 June 12th 06 01:46 PM
How can I sort one column and have the entire row sort. (binding) Blue Excel Worksheet Functions 10 November 13th 05 07:09 PM
How do I sort a column of formulas in Excel? Gordon Excel Discussion (Misc queries) 2 November 27th 04 01:55 AM
How do I sort a column of formulas in Excel? Gordon Excel Discussion (Misc queries) 0 November 26th 04 03:19 PM


All times are GMT +1. The time now is 10:02 AM.

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"