Sorting numbers into ranges i.e 0-1000,1001-2000 and getting count

Please help, 
I need to sort the following

type 	cost

apple	800
banana	1000
cherry	1500
banana	1050
banana	600
cherry	2500
apple	0

so that it sorts by type and then does count between ranges 0-1000
1001-2000, 2001-3000 
i.e

type              0-1000    1001-2000      2001-3000
apple
banana        "with a count here "
cherry

thanks
mik

--
Message posted from http://www.ExcelForum.com

0
7/15/2004 7:06:38 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
1061 Views

Similar Articles

[PageSpeed] 18

Hi
one way:
1. Add a helper column to show your type. e.g. enter the following in
column C / cell C1:
=MAX(INT((B1-1)/1000),0)*1000 & " - " &
(MAX(INT((B1-1)/1000),0)+1)*1000
and copy this down for all rows

2. Use a pivot table to create your report. See:
http://www.cpearson.com/excel/pivots.htm
http://peltiertech.com/Excel/Pivots/pivotstart.htm
http://www.contextures.com/xlPivot02.html
http://www.ozgrid.com/Excel/excel-pivot-tables.htm


--
Regards
Frank Kabel
Frankfurt, Germany


> Please help,
> I need to sort the following
>
> type cost
>
> apple 800
> banana 1000
> cherry 1500
> banana 1050
> banana 600
> cherry 2500
> apple 0
>
> so that it sorts by type and then does count between ranges 0-1000.
> 1001-2000, 2001-3000
> i.e
>
> type              0-1000    1001-2000      2001-3000
> apple
> banana        "with a count here "
> cherry
>
> thanks
> mike
>
>
> ---
> Message posted from http://www.ExcelForum.com/

0
frank.kabel (11126)
7/15/2004 7:27:17 PM
Hi Mike,

Assuming that your data are in Columns A and B, with your headings i
Row 1, and your data starting in Row 2, try the following:

D2, and copy down:

=IF((A2<>"")*(ISNA(MATCH(A2,$A$1:A1,0))),A2,"")

Enter your type headings in Row 1, starting at E1, for example 0-1000
1001-2000, etc.

E2, copy across and down:

=SUMPRODUCT(($A$2:$A$8=$D2)*($B$2:$B$8>=--LEFT(E$1,FIND("-",E$1)-1))*($B$2:$B$8<=--RIGHT(E$1,LEN(E$1)-FIND("-",E$1))))

Hope this helps!

mikew7 wrote:
> *Please help, 
> I need to sort the following
> 
> type 	cost
> 
> apple	800
> banana	1000
> cherry	1500
> banana	1050
> banana	600
> cherry	2500
> apple	0
> 
> so that it sorts by type and then does count between ranges 0-1000
> 1001-2000, 2001-3000 
> i.e
> 
> type              0-1000    1001-2000      2001-3000
> apple
> banana        "with a count here "
> cherry
> 
> thanks
> mike 

--
Message posted from http://www.ExcelForum.com

0
7/15/2004 8:11:38 PM
thank you both for your help, I will try these out!
Mike


---
Message posted from http://www.ExcelForum.com/

0
7/15/2004 9:12:56 PM
Reply:

Similar Artilces:

send the same e-mail with one or two fields changed.......
I would like to send the same e-mail to many differnet people with one or two fields changed (for example the name of recipient and the date).How canthis be done?? I would also like to be able to save the e-mail and use it again and again. can anyone help cheers john If you have Word installed and it's the same version as Outlook (both 2003, for example), you can do a mail merge between the two. This would allow you to set up the text the way you want it to, and you can save the document for future use. Look at the following page for further information: http://www.slipstick.com/con...

Lost Active Directory for Microsoft CRM 3.0
Hi, We recently had a server failure on our Domain Controller which was unrecoverable and our backups for active directory failed to restore. The CRM database and application are on a seperate server so is fully intact. But we have lost the AD, which means no access. My question is what is the best method if any to recover the CRM system? I was hoping in version 3.0 this is possible as i know 1.2 was a nightmare due to the security descriptors. Am i able to reinstall and attach to existing database and apply CRM customization? Thanks, Pete Pete, You're in luck, this shouldn'...

exporting outlook 2000 pst files to a database
I need to export outlook 2000 to a database- attachments and all. Is there a simple way to do this so you can search and retreive messages and attachments in a database form? Thanks Jeff You can export individual folders to access or excel to have them available for searching. I have never tried to export my entire .pst file to access or excel however. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After searching google.groups.com and finding no answer Jeff <laacid@yahoo.com> asked: | I need to export outlook 2000 to a database- ...

Showing 0 after decimal with ROUND
Hi, I'm using the ROUND function like this: =ROUND(C29*(92%),1) &- ROUND(C29*(108%),1) Unfortunately, if the numeral after the decimal is a 0, then it doesn't display. How can I force a 0 to display after the decimal? Libby Format the cell as Number with 1 decimal place - it would appear to be formatted as General. Hope this helps. Pete On Dec 4, 1:44=A0pm, Libby <Li...@discussions.microsoft.com> wrote: > Hi, > > I'm using the ROUND function like this: > > =3DROUND(C29*(92%),1) &- ROUND(C29*(108%),1) > > Unfortuna...

office 2000 [excel] cannot open previously OK file. Help
When trying to open a Microsoft Excel Work Sheet that I had accessed modified and saved to only yesterday [Office 2000] a window pops up with: "name.xls cannot be accessed. The file may be resd-only, or you may be trying toaccess a read only location. Or, the server the document is stored on may not be responding." Older files stored on the same mediums ;HD, Flash memory or 3.5in. diskette are accessed with no problem. This is on a network drive? ...

Cannot open Excel attachment from e-mail when Excel is already ope
This is driving me crazy. If I already have Excel open (with or with out a spreadsheet open) I cannot open an Excel spreadsheet attached to an e-mail. If I close Excel and retry it will open Excel and the spreadsheet. Any ideas? I hate having to close all my open spreadsheets when I want to open a spreadsheet that's been e-mailed to me! One of these usually works with a similar problem starting workbooks by double clicking them in Windows Explorer. Maybe one will work for you and your email problem. Tools|Options|General|Ignore other applications (uncheck it) --- or --- Close E...

Mysterious e-mails
i keep getting e-mails that look and appear that they have come from people either in my phone book or in some cases from people that have ligitimately e-mailed me or that I have e-mailed. In fact the e-mail has come from somewhere else even though the sender appears to be ligitimate. Most of these e-mails are dated 3 or four weeks old and show that they have been read in my inbox. I've asked a few people if they have forwarded the mail to me but they havn't. Most e-mails are selling Viagra or some other product. ??? any clue ??? Thanks in advance You're being spammed. First...

Outlook 2000 not opening.
I am having a major problem with outlook. Can anyone tell why Outlook will not open when selecting it. When I check in the processes there is an instance of Outlook.exe there but it is not doing anything. When a different user logs onto the machine Outlook will open fine with no problems. I have deleted the users profile and recreated it but to no use. I have tried comparing the local registry keys of the two users and they seem to be the same. Can anyone please help me as I have ran out of things to try. Thanks in advance. Justin Does Outlook start in /safe mode? (I'm assumi...

How can I get 32-bit Integers?
I am using Access MS Office 2007 with VBA 6.5, on Win XP. My Integer type is just 16 bits, i.e. its max value is 32,767. How can I configure it so as to have 32-bit Integers, along with 64-bit Longs? "Renny Bosch" <noname@nospam.com> wrote in message news:OqqNyqmuKHA.4492@TK2MSFTNGP05.phx.gbl... > I am using Access MS Office 2007 with VBA 6.5, on Win XP. My Integer type > is just 16 bits, i.e. its max value is 32,767. How can I configure it so > as to have 32-bit Integers, along with 64-bit Longs? An Access Integer is 16 bits. A Long Integer is...

How do I get Powerpoint 2003 fade in 1 by 1 in 2007
I frequently used the 'fade in one by one' feature in Powerpoint 2003, which allowed me to fade in individual bullet points by way of a click of a mouse. Not only is this feature now not standard in 2007, but I can't work out how to create it: anything that I find, tends, instead, to fade the bullet points in on some kind of automatic time schedule, rather than - as I want - on a mouse click. I want only to use text, no sounds, no pictures, and nothing fancy. Currently, I am reduced to copying my material into an old Powerpoint 2003 presentation, but this is silly....

Access 97/2000/2003 comparisons
I have a rather large application that uses an access 97 database (DAO). We also have a version that works with access 2000, Oracle, msde, and SQLServer (ADO). We would like to retire the DAO version of the product, but there are places where the ADO version is much slower compared to where we run DAO seeks (very noticeable when looping). So, I have a few questions. 1. Are there any tips/tricks to speed up ADO queries to compare with DAO seeks? 2. Would there be any benifit in using access 2003 over previous versions of the software besides the added features (xml support, etc). 3...

INTERNET MILLION DOLLARS
INTERNET MILLION DOLLARS - www.InternetMillionDollars.biz Watch the VIDEO on YOUTUBE... NOW! http://www.youtube.com/watch?v=dXQUjk5EGV0 MAKE MONEY INSTANTLY using 2007 featured INTERNET MILLION DOLLARS as a resource. WORK FROM HOME HOMEBASED JOBS AND IDEAS BUSINESS OPPORTUNITY Professor James Bradley's "Quick and real way to make BIG MONEY on the Internet!" The Independent Finally you have FOUND IT! Make a FORTUNE each month... .... every month! 100% ON AUTOPILOT Read it NOW and CHANGE YOUR LIFE! Are you fed up with being short of MONEY all the time? Do you DREAM about a...

why does sorting change a scatter plot graph?
Why does the way a spread sheet is sorted change the look of a scatter plot graph??? the graph is just a plot of two points, (X, Y) and these two points are definded by two collumns for a given row. The two collumns don't change, and the row all stays together, so why does it change where points are plotted out on the graph when you re-sort it? AndrewT420 - Usually, for an XY (Scatter) chart, with values of X in a column and corresponding values of Y in an adjacent column, for three or more points, Excel assumes (correctly) "Series in Columns." But, when you have only...

cell contents revert to 0 when i click on the next cell
I put a number into a cell click on the next cell and the first cell reverts to 0. If I format to number with 2 decimal places it will be ok but when I try to take out decimal places it goes back to zero, Help please You haven't said what number you are trying to put into the cell, but I suspect that the number is less than 0.5. A quick test shows that if you set the cell to no decimal places then enter a number less than 0.5 it is displayed 'rounded down' so it will show as zero, if it's 0.5 or above it displays as 1. If you need to put numbers less than 0.5 into youe c...

Sorting on Column headers
I have a spreedsheet that someone else created and I need to take the Column headers, which are in date form, and rearrange them in chronological order. Can this be done without cutting and pasting? I really need to save time with this project if possible. Thanks!:) --- Message posted from http://www.ExcelForum.com/ > I have a spreedsheet that someone else created and I need to take the > Column headers, which are in date form, and rearrange them in > chronological order. Can this be done without cutting and pasting? I > really need to save time with this project if possib...

getting started
I'm installing office 2003, outlook, I'm lost from server type to URL address to server info? I have sbc yahoo dsl. can you help me? damselindistress <damselindistress@discussions.microsoft.com> wrote: > I'm installing office 2003, outlook, I'm lost from server type to URL > address to server info? I have sbc yahoo dsl. can you help me? When you obtained your packet from SBC, they included all that information. Moreover, it's in the Help section of SBC Yahoo's site. The most likely settings are "pop.sbcglobal.yahoo.com" for the incoming serv...

how do you get a landscape page?
Please help, desperate! If you are using 2010, Page Design tab, Size, More pre-set page sizes. Letter landscape is the first choice. In all other Publisher versions landscape will be on the page setup screen found in the File menu. -- Mary Sauer http://msauer.mvps.org/ "becky.x" <becky.x@discussions.microsoft.com> wrote in message news:25D3EDBC-93EF-4582-94B2-83C9CE121E17@microsoft.com... > Please help, desperate! ...

limit the number of outgoing messages
Hi, who can I limit the number of concurrent outgoing messages? for example: if I have a queue of 1000 messages, how can I force exchange to send only 50 messages at a time? ...

Label a chart of counts with other percentage data
Here's the data: Group 2005 2006 2007 LTM Data A 19.4% 22.8% 21.2% 19.9% Profitability A 6 7 7 7 Count B 9.5% 31.6% 30.4% 30.7% Profitability B 2 3 3 3 Count C 22.4% 23.6% 16.6% 17.6% Profitability C 15 16 17 18 Count D 19.2% 20.5% 15.9% 13.7% Profitability D 8 8 9 10 Count I have successfully generated a stacked bar chart that shows the counts per group by year. Now I would like to include a label for each group to show profitability for each group in each year in the 4 stacks. How would I do that? Thanks, --...

Format for credit card numbers
I've tried a custom format for entering credit card numbers (four groups of four digits, separated by dashes: xxxx-xxxx-xxxx-xxxx. I have tried to use ####-####-####-#### and 0000-0000-0000-0000 but each of these causes the last digit to change to zero. So if I enter 5415779800902512 I get 5415-7798-0090-2510. Anybody already solved this problem? -- Schmacker ------------------------------------------------------------------------ Schmacker's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=28041 View this thread: http://www.excelforum.com/showthread.php?th...

Dynamic Range Selection Using VBA
What I'm trying to accomplish is to be able to run a procedure that selects a range based on a number provided in another cell. For example; if the number 10 is in cell A1, then cells A20:A30 would be selected when I run the macro. If the number 6 is provided, then cells A20:A26 would be selected. Not sure where to start, so any help is appreciated. this may do what you want range("A20").Resize(range("A1").Value+1).select -- Gary Keramidas Excel 2003 "TEK" <TEK@discussions.microsoft.com> wrote in message news:DA9FFF99-FC28-...

Is Outlook 2000 compatiple with Windows XP Home?
It seems to be having problems if it is... something like Outlook has experience a problem and must close. I rand the compatibility wizard, but it didn't help. Can you? Hi, I have Outlook 2000 installed on my XP Home machine and it works fine. >-----Original Message----- >It seems to be having problems if it is... something like >Outlook has experience a problem and must close. I rand >the compatibility wizard, but it didn't help. Can you? >. > Rod <anonymous@discussions.microsoft.com> wrote: > It seems to be having problems if it is... something...

OL 2000 should not autom send/receive on start
Hi, I found it in OL 2002 but not in OL 2000. How can I define, or better disable, that OL is trying to send/receive mails on starting and closing OL? And it should never automatically try every x minutes to do so. I found this option on OL2000 but my impression is, that OL is still polling the pop3 account for new mails. Any help on this would be appreciated. Thanks a lot Hans Tools->email accounts->send/receive settings. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail se...

ANN: Optimizing the Performance of Microsoft Dynamics CRM 3.0 white paper
Hi, the White Paper "Optimizing the Performance of Microsoft Dynamics CRM 3=2E0" is now available: http://go.microsoft.com/fwlink/?LinkID=3D80916=20 Regards Nicolas F=FChrs ...

Outlook 2000 #187
When I launch Outlook 2000, it hangs up. I've installed the upgrade from Office 97 to Office 2000. Can anyone tell me why outlook hangs up. I've check the properties and verified my internet e-mail information. Regards, J. Tolbert Fuller, jr. Houston TX 77093-8411 E-Mail: johntoljr@earthlink.net Fuller John T. <anonymous@discussions.microsoft.com> wrote: > When I launch Outlook 2000, it hangs up. I've installed > the upgrade from Office 97 to Office 2000. Can anyone > tell me why outlook hangs up. I've check the properties > and verified my inte...