If Count is not in a certain range, delete Rows

I have a spreadsheet that is 59752 x 2, with the one column Contact ID A and 
the other column Contact Link ID. It is like an instant messaging system. It 
looks something like this:
 
1   2
1   3
1   15
2   1
2   15

I want to count by different values in column A, and any count that is not 
within one of several ranges, those rows get deleted. So if the range is 3-5 
contacts, then I want to keep the set of 1s, but delete the set of 2s. My 
ranges are 4-5 contacts, 30-41 contacts, and 100+ contacts. 

I am also brand new to macros, but I have experience with some other coding 
in Matlab and other programs and I understand logic statements and the like. 
Still,  the more help/explanation the better.  I am using 2007.

Thank you!!
0
Utf
2/23/2010 4:52:01 AM
excel.misc 78881 articles. 5 followers. Follow

0 Replies
761 Views

Similar Articles

[PageSpeed] 15

Reply:

Similar Artilces:

Add data but disallow the deletion of the original data
Hi, Is there are a way to let users add on data to a spreadsheet but disallow them to modify/delete the original data? -- Regards, Adrian lock the cells to be protected>unlock the cells allowing changes>protect sheet -- Don Guillett SalesAid Software donaldb@281.com "Adrian" <xinke@hotmail.com> wrote in message news:OUrzVeShEHA.1048@tk2msftngp13.phx.gbl... > Hi, > > Is there are a way to let users add on data to a spreadsheet but > disallow them to modify/delete the original data? > > -- > Regards, > Adrian > > Adrian You...

Pivot table and counting.
I have a pivot table that gives me the number of rides done by a van. I can have the pivot table return the number of rides, but what I need is the number vans that participated for a certain day. Example, it is possible to have 27 trips done by 18 vans, how can I count the number of vans and not addup the van number? Any help appreciated. Thank you, Joe Hi Joe We need a bit more information on how your source data table is set up. What information do you have in each column? -- Regards Roger Govier sacredarms <sacredarms@discussions.microsoft.com> wrote: > I have a pi...

Cycle Counting
Hello, I am looking for ideas on how to cycle count serial number tracked items without increasing workload. Our serialized items are barcoded but the problem is the are situated on the pallet incorrectly and the pallet is placed on a third level of a racking system. If we could just cycle count based on item count and not include the serial number it would make it easy. Is this possible in Great Plains. We are running Great Plains 8.0. Any suggestions are greatly aprreciated. Thank You, Brian Morris Database Administrator ...

Set RN = Range(Cells(2, 1), Cells(r, 1)) error
What wrong with this. It create error. How can I improve to get rid the error? Set RN = Range(Cells(2, 1), Cells(r, 1)) Thanks Daniel Hi Daniel, Too much missing information - has r been declared and what data type is it and what value does it have. What property of the range are you trying to store in the variable RN? What type of variable is RN and has it been declared. -- Thanks, Shane Devenshire "Daniel" wrote: > What wrong with this. It create error. How can I improve to get rid the > error? > > Set RN = Range(Cells(2, 1), Cells(r, 1)) > &...

Excluding Rows During Printout
Hi, Is there a way to automatically exclude rows when printing an Excel sheet? I have a list of items (in two colums) in a work sheet similar to this: Task Time ----------- ------- Task A: 1 Task B: 0 Task C: 2 Task D: 0 Task E: 0 Task F: 0 Task G: 4 Task H: 1 When I print the worksheet I only want to print lines where the time cell is not zero. So the printout from the previous data would look like this: Task Time ----------- ------- Task A: 1 Task C: 2 Task G: 4 Task H: 1 Is there a...

How can I recover emails that I shift delete by mistakes
pls advise, thanks Pst-file? You might try the following; http://www.howto-outlook.com/howto/restoredeleteditemsfromanoutlookpst.htm -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- <anonymous@discussions.microsoft.com> wrote in message news:088401c4846f$31be7c20$3501280a@phx.gbl... > pls advise, thanks ...

Rank range changes
Received help a couple months ago. Lost my notes. How do I use $ to help speed changing ranges when using the RANK function? Skip Skip wrote: > Received help a couple months ago. > Lost my notes. > How do I use $ to help speed changing ranges when > using the RANK function? > Skip Looks like this was answered yesterday in another group. Please don't multipost. Thanks! http://preview.tinyurl.com/5olnw2 ...

Linking a defined range to a picture in PowerPoint
Hi, I know this is a long shot, but I'm hoping SOMEBODY has the answer.... I need to create a power point presentation that links to an excel workbook. The reason I need to link it is because the numbers will change monthly, and the presentation is distributed monthly. So, I need to create a presentation that will: 1) have excel worksheets in it that link to defined ranges in a workbook. 2) HOPEFULLY have the Pow.Pt. worksheet appear as a bitmap (if not thats ok) 3) allow the Pow.Pt. SS (or the picture) to link to the SS so that the image will change every month. I know it'...

Count
Hi, I would like to know how which formula I should use to count some codes & to ignore the duplicated codes, for example in column A: Code 1234 4321 4321 1234 1234 3214 Now, I want Excel to count & the result is 3 which are: 1234-4321-3214 Yes I can use PivotTable, but I would like to use a formula because I have to deal with this every day. I appreciate your support. -- MFS22 COUNTIF will do it. =COUNTIF(Rng,Rng), where the criterion is the same as the range: e.g =COUNTIF(A3:A8,A3:A8) HTH Peter "MFS" wrote: > Hi, > I wo...

Formulas don't work in certain cells #3
One formula is: =SUM(C10:C15) another: =SUM(O16/6363) another: =SUM(C19:C36) these same formulas work in the cells right next to these wit different cell references. However, no matter which cell I put th above formulas in, the result is the same - either blank with a dash i the cell or zero. I checked all the cells that the formulas refer t and none has any errors. -Jorda -- kalik24 ----------------------------------------------------------------------- kalik247's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1594 View...

How do I count the # of times a value reoccurs and plot it over ti
I wish to plot a number of errors made by each users and compare it over time. I have a column of user ID's and a column of dates. I want the chart to count the number of times each user ID appears and plot against it's corresponding date. However, each time I try to do this, the chart appears wrong. Any ideas? In article <9595B2A1-8282-4AB3-8511-A6776E108164@microsoft.com>, Stephen@discussions.microsoft.com says... > I wish to plot a number of errors made by each users and compare it over > time. I have a column of user ID's and a column of dates. I want t...

Line count
I am working with a program called Dictaphone. We use Word 2007 in this program. The line count on Dictaphone and the line count in Word 2007 are different even though the Dictaphone text is retrieved from Word 2007. Why would they be different? What is the difference between virutal line count and physical line count? ...

Read values from excel rows
hi I am trying to read the values from a excel row. There are 89 columns for each row and same number of data in each rows. Kindly help regards shantanu shantanu, You need to explain how/where you want to read them.... From another workbook, another worksheet, a VBA function, a macro, a C# application? HTH, Bernie MS Excel MVP "shantanu" <shantanusenin@gmail.com> wrote in message news:1184298794.259390.216180@i38g2000prf.googlegroups.com... > hi > I am trying to read the values from a excel row. There are 89 > columns for each row and same number of da...

count number of characters in rich edit control
How can i count number of characters in rich edit control 2 If u mean controls of type Rich TextBox control, try RichControl1 RC1; CString Mes=RC.GetText(); int n=Mes.GetLength(); "Rahul" <Rahul@discussions.microsoft.com> wrote in message news:7743023C-EA83-4ACA-AB67-F1AE7279F1EB@microsoft.com... > How can i count number of characters in rich edit control 2 EM_GETTEXTLENGTHEX, WM_GETTEXTLENGTH, WM_GETTEXT, EM_STREAM* "Rahul" <Rahul@discussions.microsoft.com> wrote in message news:7743023C-EA83-4ACA-AB67-F1AE7279F1EB@microsoft.com... > How can i co...

Completion Percentage of a date range
I have started a task sheet in excel and i have a "task description" coloumn, a "start date", "finish date", "number of days" and a "% complete" column. What i want to achieve is the user to enter the first task start date and the number of days it will take to complete. Then excel will work out the end date and the percent complete field relating to the current date. Is there a easy formula of working out the percentage? Many thanks Hi Brian, I think this is right? Assume Column A is Task, B is Start Date, C is No. of Days, D is End ...

Date range for a report
Hi I am trying to run a query and can't seem to nail down the right code. We use the access database to track files, incoming/outgoing correspondence dates etc. I am trying to run a query that show me files with dates in a follow up field of -60 days to +7 days, so essentially any follow ups missed in the last 2 months and up coming in the next week. This report is run on a weekly basis. Appreciate any help Thanks Assuming that the follow up field is actually a date/time data type, try this in the criteria: Between Date() - 60 and Date() + 7 -- Jerry Whittle, ...

subscript out of range error
My program went down with on error in the code. I fixed that error an tried to re-run it. When I go to re-run the program I get a subscrip out of range error when I try to open a worksheet that I know exists. If I close the workbook and re-open it the subscript out of range erro doesn't show up. Below is the code. With Worksheets("ListBox Data").Range("A2") workbook_row_cnt = Range(.Offset(0, 0) .End(xlDown)).Rows.Count For i = 0 To workbook_row_cnt - 1 If .Offset(i, 0) <> "" Then sales_group_cnt = sales_group_cnt + 1 End If Next i End With ...

Counting sales
I have two different datasets. Each with a common identifier. I need a formula that will reference the identifiers in both datasets and count the number of sales a particular agent made. Example. look up this identifier in the other dataset and then give me the value that is 2 columns over from the identifier in the second dataset. See if this helps: http://contextures.com/xlFunctions02.html -- Biff Microsoft Excel MVP "Dave" <Dave@discussions.microsoft.com> wrote in message news:E7245B37-033F-400E-9CEE-9822BE7CB0F5@microsoft.com... >I have two...

Search n Replace Certain Attributes in XML
This is a multi-part message in MIME format. ------=_NextPart_000_01FB_01C34182.ECCAE660 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi,=20 I have an XML file and am coding in VB.NET using webforms. [CODE] <cashier> <tag section=3D"work-14" param1=3D"0" param2=3D"1000195" /> <tag section=3D"work-14" param1=3D"0" param2=3D"1000195" /> <tag section=3D"work-24" param1=3D"0" param2=3D"1000195" /> <tag section=3D&q...

Deleted messages not going away
I have a message that was deleted from the inbox but does not go to the deleted items folder and I can't get rid of it. This has happened to 3 out of 500 users in my company. The e-mail is a cleaned message that originally carried a virus. How do we get this out of the Inbox? Will not allow me to move or delete it as it has already been done once. ...

Extracting Data from a Database, but skipping rows
This is my first post here so hi everybody... The situation is this: I have tables in different files, the main one is used to creat projects and assign a person who will be in charge, among othe information, the other tables are used by some people to fill in th hours dedicated to each project assigned to them. For example (Main Table): Project A, Responsible John Project B, Responsible Bob Project C, Responsible Mary Project C, Responsible Bob Project D, Responsible Mark Project E, Responsible John What I need to do is to find some way to update the dependent tables s that when I create a ...

How to delete phantom statement?
In M2007 I have a downloaded OFX statement for an investment account that won't go away. It says there are 2 transactions, but if I click on them, there are none. If I try to delete the downloaded statement, there is no error, but the statement does not go away. I've tried repairing the file - no errors, but statement is still there. I removed online services for that FI, restarted Money, and set up online services again but its still there. I also had a few new transactions come in, and the new statement downloaded fine, but after it was processed the old statement is still hangi...

Auto date range updating in Charts
I would like to know how to write a formula that can be typed into an excel chart's category labels box and series values boxes to search for and update ranges to a specific range, such as one year's worth of row entries. In this way, each time a new date and set of entries are made into the spreadsheet, the accompanying chart would update to the new range (last date). I have tried using named formulas to accomplish this, but I have so many spreadsheet in the workbook, that this becomes unwieldy. Any suggestions would be greatly appreciated. thanks, Hi Dave, > I have t...

Counting Cells with Conditional Formatting
Is there a way to look at a row of data that is either highlighted yellow or red and to count only the data that is highlighted yellow and give me that number? None of my data is numerical....just one letter data, i.e.: "S" or "U" I just want to count how many of the cells are highlighted yellow in a specific row, if that makes more sense. Here's a UDF (Put in a Standard module) and use it in cell A1, like =CountByColor(A8:H8,6) << where 6 (at present) = Yellow = change to =CountByColor(A8:H8,3) to get the reds HTH Function CountByColor(InRa...

COUNT ? need formula
Hi, I want to track the results of my teams sales performance. I record if it is a sale, no sale, cancelled etc in column M. I thought I'd be able to use the COUNT function/formula to be able to search for all the SALES in column M and place the result in a cell ( column O )but I can't work it out. Any ideas? Damian Hi! Try this: =COUNTIF(M1:M100,"sale") Biff "Diamond Jones" <kwanzaNOSPAM@optusnet.com.au> wrote in message news:43a0e897$0$17704$afc38c87@news.optusnet.com.au... > Hi, > > I want to track the results of my teams sales perf...