selectively deleting cells

I would like to selectively delete alternate rows on an excel worksheet containing a long list of data. i.e. deleting rows/cells A3,A5,A7,A9,A11....A30573 etc. How do i do this quickly without having to use CTRL + select for each specific cell/row? 
0
del1 (16)
7/3/2004 2:50:01 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
596 Views

Similar Articles

[PageSpeed] 47

Del,

It isn't clear what you mean by "selectively" delete the rows. If
you just want to delete every other row, use code like

Sub DeleteEveryOtherRow()
    Dim RowNdx As Long
    Application.ScreenUpdating = False
    For RowNdx = 30573 To 3 Step -2
        Rows(RowNdx).Delete
    Next RowNdx
    Application.ScreenUpdating = True
End Sub


-- 
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Del" <Del@discussions.microsoft.com> wrote in message
news:A6F19212-2C50-46E3-99E1-9A8C0C88C90F@microsoft.com...
> I would like to selectively delete alternate rows on an excel
worksheet containing a long list of data. i.e. deleting
rows/cells A3,A5,A7,A9,A11....A30573 etc. How do i do this
quickly without having to use CTRL + select for each specific
cell/row?


0
chip1 (1821)
7/3/2004 3:10:43 PM
Reply:

Similar Artilces:

Link a cell to min & max box for Value (X) axis scale?
I want to update the min and max box of the Value (X) axis scale without having to click on the axis, select the tab and type in the min and max times for each scale for each chart. Can I assign a cell in the spreadsheet so that its value will be used in the min and max boxes? Does anyone have a suggestion on how to best accomplish this? Thanks, You have to do this programmatically. For a readymade solution see AutoChart Manager http://www.tushar-mehta.com/excel/software/autochart/index.html -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutoria...

reading a cell from multiple files that are not currently open.
I fear that I'm in trouble here. I have hundreds of xls sheets in different directories, however they all used the same template when they were created. So I need to read one cell from all these files, then count the instances of the contents of that cell, then finally graph it all out. well the graph is optional, but would be nice now how do I go about doing this? I know you can read cells from open files, but how about unopened ones in different directories and completly different file names I tried writeing a program for it with Qbasic (small buisness :)) but the xls format is strange...

Scatter chart for real-time tracking of a single cell value ?
Hi. I use Excel 2003. On a spreadsheet connected to a DDE data feed, I have a cell containing an integer number that updates and changes constantly during the day. I would like to chart the number in that cell in real-time second by second between certain hours of the day. I have been told that it may be possible to use a scatter chart to do this but I have not been able to make it work or to find useful help files. It seems to me that the problem has to do with charting a single cell rather than a range but I'm not sure. Any practical advice or pointer to a "how-to" web site w...

Delete Table
Delete Table I have a report bound to a table (made with a make-table query). I want to delete the table once the report is closed; I no longer need it. I can=92t delete the object, however, when the report closes because the report has the table locked and I don=92t see an unload event for the report. Any advice? Thanks, alex If SysCmd(acSysCmdGetObjectState, acReport, "rptYourReport") <> 0 Then DoCmd.Close acReport, "rptYourReport" End If Regards Kevin "alex" <sql_aid@yahoo.com> wrote in message news:9192a8...

Are you sure you want to delete 7 records?
I'm working with a database created by someone else who appears to have had about the same knowledge level that I do (limited, brute force). One of the functions it serves is to create a series of reports by pulling records from another database. She went about this in what appears to be a rather complicated way, creating and deleting a series of new records. I'm hesitant to try and rewrite everything she's done, because it is rather complicated, but I'd love to be able to suppress the Delete? dialog. I produce the reports 3 times a week and have to 'enter' through ...

Outlook Deletes Read Messages Automatically
Has anyone had this happen to them recently? I am receiving emails, but as soon as I read them, they are disappearing. I don't believe any settings have been changed. In addition, months worth of emails were erased from my PC at the same time this started happening. How do I fix this? Thanks a lot! Right click on your toolbar, select to show the Advanced Toolbar. On the dropdown, do you have "Unread Messages" selected? If yes, change it to "all messages." --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the ...

Cell / Date Formatting Question when result = -0-
Please help, I am using this formula to post a date. =IF(master!T3>0,master!S3,"") When the value is a date...no problem. When Master sheet Cell s3 has no value, the result is 01/00/00 How can I change this? Is there a custom date format to show a "-"? Many thanks. Try a custom format of: mm/dd/yy;;-;@ HTH Jason Atlanta, GA >-----Original Message----- >Please help, > >I am using this formula to post a date. > >=IF(master!T3>0,master!S3,"") > >When the value is a date...no problem. > >When Master sheet Cell s3 has no ...

Any way to apply a filter automatically after changing a cell?
I have a report in excel with dates at the top that I can change to change the information it imports. This leaves some rows blank at times, so I have 1 column that I manually filter to remove the empty rows, goes like this change beg date, change end date, clear old filter, apply new filter Is there any way to automatically have the filters be cleared/applied when changing the dates? ...

how do I insert the current time (static) and date in a cell?
I want to use Excel as an automated timesheet. Ctrl + ; and Ctrl + : -- Regards, Peo Sjoblom "DF" <DF@discussions.microsoft.com> wrote in message news:AC5E6E1E-8C18-4422-8A8A-0B26FBD66DBC@microsoft.com... > I want to use Excel as an automated timesheet. That instruction does not help; I have tried to do that, but nothing happens. "Peo Sjoblom" wrote: > Ctrl + ; and Ctrl + : > > > -- > > Regards, > > Peo Sjoblom > > "DF" <DF@discussions.microsoft.com> wrote in message > news:AC5E6E1E-8C18-4422-8A8A-0...

Delete records from table
Currently I had a order form which has a textbox name outstanding. Whenever textbox "Outstanding" = "Paid" and textbox "PaymentMethod = "Cash", it will insert information from the order form into table name "Transactions". strFound = DLookup("[Description]", "Transactions", "[Description] = ' " & Me. [CustomerID] & " , CNO:" & Me.[ChequeNumber] & " , Inv No:" & Me.[InvoiceID] & " ' ") If (Len(strFound) >= 1) Then MsgBox "This invoice has been record...

Unable to Delete Contacts
After importing contacts into Outlook we are having difficulty deleting the contacts. Although they can be deleted it takes up to 2 minutes to delete each contact. As we are importing up to 1,000 contacts at a time you can see how this is a problem. Has anyone else had this problem?? Please help. Thanks! I'm a bit confused by your post -- if you just imported the contacts into Outlook, why are you already deleting them?? Where are you deleting them from? -- Jocelyn Fiorello MVP - Outlook *** Replies sent to my e-mail address will probably not be answered -- please reply only...

Select Date based on date value
Is there a formula where I could select a date based on a condition? here is a scenario of what I want the formula to do: I have 3 dates: start date,end date, and invoice date, let's assume that the start dat is 9/7/2005, end date is 10/6/2005 and invoice date is 10/8/2005. no even though the invoice was sent on 10/8/2005, I would like to identif this month as september because the bulk of the month fell on september I guess the rule would be(per example above): per example above: if starting month >= 09/20 then select 10/2005 else month < 9/20 then select 9/2005 so if the 20th...

VB Code For Taking a user to a named cell
Hi, I have a long table of contents for a large excel model. I'd like to have a button next to certain items, that when the user clicks the button, Excel will take the user to that named Cell. Can anyone tell me what VB code would go in a command button to allow me to do this? Any help would be huge, thank you. Brady Brady, You can do this using Insert - Hyperlink. Place in this document. No code required for this solution. -- Earl Kiosterud www.smokeylake.com ----------------------------------------------------------------------- "Brady Finney" <btf@atlantic-mgm...

referencing cells with carriage returns
I am trying to write a simple cell reference (=a62), in which a62 contains some carriage returns in it. CRs were originally entered as alt-return, and asc(CR)=10. In my new cell, I get the string of text showing the boxes to indicate the CR, but there is no CR realized at the proper place. Any thoughts on how to make my new cell look like the referenced one, with CRs in the proper places? Any help greatly appreciated. Thanks david David Format>Cells>Alignment>Wrap Text on the cell with =A62 Gord Dibben Excel MVP On 19 Dec 2004 11:45:40 -0800, "David" <davidmd68@ya...

deletable updates, hotfixes & service packs
I am running out of space on the fixed disk of my home machine. I use Windows XP Pro, Office & Internet Explorer. When I look at the "Currently installed programs & updates" list in "Add or remove programs" there are many security updates, updates, hotifixes & service packs. If the count of items in this category is proportional to the storage space they take, they take 50% of my storage. Can any of these items be deleted? Or does each new item of this type delete all possible previous versions, e.g. Service pack 3 deleted SP 2 & SP 1? If they ...

Too Many Different Cell Format
I got error message " Too Many Different Cell Format". Anyone know what caused it? Thank you. for further assistance on this particular issue, click on https://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.excel.misc&tid=1d4df007-3dc4-41f0-8182-aafe32548d4f&cat=en-us-excel&lang=en&cr=US&sloc=en-us&m=1&p=1 -- learn - n - enjoy ------------------------------------- click yes below, if it works for you "Bamboo" wrote: > I got error message " Too Many Different Cell Format". Anyone know ...

Frustrated with cell formatting
Hmmm... have been tearing hair out.... I want the following cell formatting to occur but I just can't figure it out. If the value is zero - I don't want to see anything. However I don't want to turn zero's off at the sheet level because there are other places that I do want zero to appear... If the value is 1 then I want to see 1 - no decimal places... if the value is less than one I want to see 0.3 (for example) - one decimal place with leading 0. if the value is greater than 1 I want to see 1.3 or 2.0 (for example) - one decimal place with leading 0 NB - the numbers wil...

What's the calculation to delete duplicate lines/data?
What's the calculation to delete duplicate lines/data? consolidate Hi try 'Data - Filter - Advanced Filter' and check 'Unique entries' -- Regards Frank Kabel Frankfurt, Germany "EV" <EV@discussions.microsoft.com> schrieb im Newsbeitrag news:E6E885CE-0419-4F3A-83D5-7559A0394A7D@microsoft.com... > What's the calculation to delete duplicate lines/data? consolidate ...

macro to copy down the values while the adjacent cell be NOT empty
Hi, thank you for help me! I have 2 columns and I need to copy down the value in the first-one until the adjacent column be empty. I can't define any range because the list will vary every time. =AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC name1 1 ? 2 ? 3 ? 4 ? 5 . 6 . 7 . 8 =AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC=AC I was thinking in something like: i =3D 0 For Each cellA In rA For Each cellB In rB i =3D i + 1 .Cells(i, 3) =3D cellA .Cells(i, 4) =3D cellB Sub Auto_Fill() Dim Lrow As Long With ActiveSheet Lro...

Opening View Selection
In a prior version of Money, I was able to select "Last Page Viewed" as an option for the page loaded when Money starts! In Money 2007, you are presented with several choices. But, I want to go directly to "Portfolio". Is there any way to do this in version 2007? Thanks in advance! In microsoft.public.money, Patrick wrote: >In a prior version of Money, I was able to select "Last Page Viewed" as an >option for the page loaded when Money starts! In Money 2007, you are >presented with several choices. But, I want to go directly to "Portfoli...

macro & selecting multiple sheets
Ok, I have pondered this and scratched my head until i've lost some hair. I have a workbook, this workbook represents a payperiod, with up to 40 sheets named by the employee's name that relates to that sheet (the data is obviously different, but the format does not differ). I also have a totals page I use to calculate cost, hours and a few other issues. The problem is, I need to reformat all of this information for a payroll transmittal in an entirely different format, I have created a macro which does this by automatically coping, pasting, and deleting a sheet one at a time. My qu...

Highlight of Selected Cells
Hi, Normally you can use the Ctrl key and select multiple, non concurrent cells in a spreadsheet. These cells are highlighted in a different color, clearly evidencing which cells you've selected. On a co-workers system, these cells do not highlight, thus she has no way of knowing which cells she has selected. Anyone out there had this problem and/or know of a solution? R.D. ...

MS Delete Links Addin (Wizard)
I need to delink charts from their source data before posting the workbook on a network. Each worksheet has 8 charts. There are about 12 worksheets. There are bar charts and line charts. The line charts have up to two series of data each. The Delete Links Addin does remove the links from the bar charts and from the embedded (cell) formulas. But, although it 'sees' the links in the line charts (they appear in the list as the wizard seeks links), they are not eliminated. These links remain after processing. Any Help or Ideas? Thanks!!! SEDK A macro like this ought to ...

Emailing all contacts in selected accounts
I think I may be missing something here so forgive me if this is a dumb question I want to find a bunch of accounts and email all of the contacts within those accounts If I go to the accounts page and do my search (perhaps using advanced find) such that all the records I want to email are now on the screen, if I use the actions menu to send email to them, will the software email all the contacts in those accounts? If not, how can I do this Thanks for your help Derek You sure can. Do your advanced find, then select which contacts you want to send (or all if you wish), then click "Acti...

How to delete multiple attachments
Outlook 2003 - Is there some shortcut to deleting more than one attachmenet in a received e-mail? Curently, if I select more than one, the cut or remove is grayed out. Can't use the delete key. Appreicate any guidance. thanks, Larry On Wed, 7 Jan 2004 14:52:37 -0800, "Larry" <anonymous@discussions.microsoft.com> wrote: >Outlook 2003 - Is there some shortcut to deleting more >than one attachmenet in a received e-mail? Curently, if >I select more than one, the cut or remove is grayed out. >Can't use the delete key. Appreicate any guidance. >...