Delete Rows #2

I would like to be able to delete a row with a name in it based on a
cell with that name from another cell in a different worksheet.  Any


bml66 (24)
12/28/2006 3:42:54 PM
excel 39879 articles. 2 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 17

Hi Bernie

This example loop through row 1 - 100 on the activesheet and if the value in A is the same as in
 Sheets("Yoursheet").Range("A1").Value in delete the row

Maybe you can use a Autofilter if you have many rows (faster)
See this page for more info

Sub Example2()
    Dim Lrow As Long
    Dim CalcMode As Long
    Dim ViewMode As Long
    Dim StartRow As Long
    Dim EndRow As Long
    With Application
        CalcMode = .Calculation
        .Calculation = xlCalculationManual
        .ScreenUpdating = False
    End With
    ViewMode = ActiveWindow.View
    ActiveWindow.View = xlNormalView
    With ActiveSheet
        .DisplayPageBreaks = False
        StartRow = 1
        EndRow = 100

        For Lrow = EndRow To StartRow Step -1

            If IsError(.Cells(Lrow, "A").Value) Then
                'Do nothing, This avoid a error if there is a error in the cell
            ElseIf .Cells(Lrow, "A").Value = Sheets("Yoursheet").Range("A1").Value Then .Rows(Lrow).Delete
                'This will delete each row with the Value "ron" in Column A, case sensitive.
            End If
    End With
    ActiveWindow.View = ViewMode
    With Application
        .ScreenUpdating = True
        .Calculation = CalcMode
    End With

End Sub


Regards Ron de Bruin

"Bernie" <> wrote in message
>I would like to be able to delete a row with a name in it based on a
> cell with that name from another cell in a different worksheet.  Any
> ideas? 
> Thanks,
> Bernie
rondebruin (3789)
12/28/2006 9:33:19 PM

Similar Artilces:

Pivot Table row comparison
I'm trying to compare an old customer schedule with their new schedule and highlight the changes with colour or by hiding a row. My pivot table looks like this Prod Sched wk1 wk2 wk3 A old 3 2 3 A new 3 4 3 B old 2 2 2 B new 2 2 2 So in the above example I'd like to colour the cells for wk2- Product A in yellow, and hide the product B rows as there has been no change in demand. Can someone give me some advice about how to do this Thanks for your help Ross How about an alternative??? Your raw data looks kind of like this: Prod Sched wk# qty...

How to Recover Deleted Sent Mail?
While trying to delete very old "Sent" mail I seem to have deleted all "Sent" mail. Is there a way of recovering this mail? Have you closed Outlook since deleting the old sent mail? might help. Next time, archive the items you want removed from your active .pst file. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, Sidney Friedman as...

Cannot delete subreport
I am using Access 2003 and have a report I did a while back with a simple subreport. I want to remove the subreport but for the life of me can't figure out how to do it. Any help would be greatly appreciated. Thanks. Hi - When you say "remove the sub report", what do you mean? Do you want to delete the entire subreport control containing the subreport, or do you want to keep the control, but change the report contained in it? The first is easy - select the control by clicking once on it once, then press delete. For the second, click the control once, then set ...

Age calculation #2
Hi, I'm looking for a formula to give a better response on age calculation. I have a list of computers with the data they were purchased on. I want to know how old they are. Here is what I have so far: G1 contains =today() to give current date F14 is the purchase date of the first computer in the list G14 is this formula, which tells me how many months old the computer is: =($G$1-F14)/30 The problem is that it tells me that the computer is 90 months old, which is correct, but I want to see that its 7.5 years old. Dividing that by 12 gives the answer, but there are newer computer...

Rule for Deleted Items
I am being told that there is a rule in place on my Exchange server that will not empty the deleted items folder every 30 days for certain users in my organization. I found a recipient policy in System Manager that says "Users Excluded from Mailbox Cleanup" but it only shows 2 users and not the 3 I was told about. But I have confirmed that the missing person has email in her deleted items folder going back to 2005 so it must be working. Is there any other location I should be looking? Also, we just had someone come in and migrate our Exchange environment from 2000 to a new...

Reply #2
Hi, I have tried this but it still tries to save as the default which in this case is No, when I need it to save as Yes Many thanks anyway John PS I think by putting your suggestion in, it just hides the alerts, but still keeps to the defaults. JohnUK wrote: > Hi, I have tried this but it still tries to save as the > default which in this case is No, when I need it to save > as Yes > Many thanks anyway > John > PS I think by putting your suggestion in, it just hides > the alerts, but still keeps to the defaults. If indeed you even see this, PLEASE do NOT change the su...

Time Card Report #2
Does anyone know if there is a more user friendly template for Time Card report ? We pay employees every 2 weeks and whenever I run a 2 week report, it only shows one date and below this date it sums up 2 dates of cumulative time worked instead of showing the isolated 2 dates. In other words, under a Monday 5/1, it will show 15 hours which actually means that the person worked cumulatively 15 hours on Monday 5/1 AND Monday 5/8... but Time Card report doesn't show the 5/8 separately which is quite confusing and invonvenient. Any help would be highly appreciated! Here is an addit...

1.2 Integration Release
Microsoft, when is 1.2 Integration going to release? All I hear is "soon", but "soon" is now turned into months. -- Brandon IT Director Presentations Direct - Office Equipment & Supplies I have NO real information, but if I had to guess it would be announced just prior to or during Convergence (3/21- 24). >-----Original Message----- >Microsoft, when is 1.2 Integration going to release? All I hear is "soon", >but "soon" is now turned into months. > >-- >Brandon >IT Director >Present...

I need to show the last number in a rows in the total pending row
I have a column where I list pending cases each month and I need to show the last number in the total pending cell at the bottom of the row. I can use an offset fomula which works if the pending cases begin in row 1. However, I am not able to get it to work if the pending cases begin in rows 4 or 5 as an example. Any suggestion? Rows don't have a bottom.............guess you meant Column. Last number in column A =LOOKUP(99^99,A:A) Last anything in column A =LOOKUP(2,1/(A1:A65535<>""),A1:A65535) Gord Dibben MS Excel MVP On Wed, 28 Jan 2009 16:30:08 -0800, Jen S ...

hello #2
hello how am i able to give a percantage discount on the pos screen. i have a dollar retail bussiness and some times customer buys for example 50 or 100 candles from me for a weeding. so is their a way that i can give her 8% discount. so it should be something like this .... 0000123 white taper candles $1.00 x 100 = $100.00 minus 8 % = $100.00 - 8% = $92.00 92.00 plus tax thanx in advance From POS do Shift-F3 to get to the Discounts tab and take a look at the variations. You should be able to accomplish what you need. Richard "Adnan" wrote: > hello > how am i able t...

number of rows #2
I used autoformat so that my rows would alternate colors. But, it added a bunch of empty rows so that the sheet is maxed out and my file is huge. I don't need all those empty rows and I can't find a way to delete them. Any suggestions for how to get rid of the rows, or limit the number of rows on a worksheet? I know I could copy all the data to a new worksheet, but I'd like a better solution. Try this: click on the number of the first empty row, so the whole row is selected. Using the vertical scrollbar, go to the last row on the sheet. Hold down the shift key while you cli...

Referring to Names #2
Hi Frank I'm looking for something that's easy to copy across. Say column A contains an alpha and columns B to X contain variou numerical values with range created names of Bdata to Xdata. I'm wondering if there is any way of writing the formul Sumif(Alpha,A,Bdata) by referring Bdata to a cell reference instead o using the term "Bdata" itself, so that I can change the cell and brin up the relevant result. Hope this makes sense Timmy Ma -- Timmy Mac ----------------------------------------------------------------------- Timmy Mac1's Profile: http://www.excelfo...

cannot delete message from deleted items
I have a message in my deleted items folder that when choosing delete opens the McAfee box warning of potential virus and wants me to choose open or do not open, but will not delete. I have tried choosing another file and holding ctrl and choosing the file I want deleted and then choosing delete, I have tried moving it to the desktop but it will only copy there, I have tried every form of delete possible. I need help. Anyone know how? Outlook 2002. Can you empty the deleted items folder entirely? Or turn off the McAfee scanning temporarily to see if it makes a difference? Julie wr...

I can not delete a duplicate personal folders list #2
Vall... amazing that there isn't an easy fix for this. The instructions provided simply don't work ( tools-email accounts-view change email accounts-deliver to new account-finish-close outlook and reopen ), and none of the other offered explanations have worked either. As this is such a common problem; why hasn't microsoft provided a very EASY fix? I am more confused ( and frightened ) and don't want to make the problem worse! Your profile is corrupt, probably based on an incorrect migration of your ..pst file. Create a new mail profile and configure it to use your exi...

Retrieval of Deleted Items After Being Deleted from the Deleted Items File
I deleted a number of important emails from the deleted items file in Outlook 2000. This may sound stupid, but I completely emptied the deleted items file instead of deleting them one by one. Pretty stupid, huh. Anyone. Can they be retrieved? Please help. Thanks. Sorry for sending this again but I seem to be computer illiterate and it has taken me some time to explain the whole situation. Thanks again. unless you use Exchange server with deleted retention enabled, you are most likely out of luck, but you can try something that might help....

Follow Up Flag #2
When I set a follow up flag in Outlook 2000 it inserts a default time of 18:00. Is there a way to alter this default or do I have to change the time manually for every flag I set? ...

Conditional Formating #2
Good morning to everyone. Does anyone know if Conditional Formating have an issue in the charts? i have make text boxes which bring values from another sheet and i want to show the figures inside as green when i have an improve or red if i have damage. Any suggestions? Ps I am using EXCEL XP edition Regards Bill Jon Peltier has instructions for conditional charts: You could change the formula, to calculate if an amount is greater or less than the previous amount. Bill wrote: > Good morning to everyone. > >...

Delete macros
I am using Excel 2002. When I click on Tools->Macro->Macros... i see 2 macros. The problem I am having is that I can't delete these macros, the delete button to the right is grayed out. How can I delete these macros? Hi maybe the macros are protected. Try hitting ALT + F11 to open the VBA editor and try to delete the macros / modules there -- Regards Frank Kabel Frankfurt, Germany excel777 wrote: > I am using Excel 2002. When I click on Tools->Macro->Macros... i see > 2 macros. The problem I am having is that I can't delete these > macros, the delete button to ...

deleting email in outlook, freezes before i can delete
i have a file with pics that symetec scanner says is to large. i can receieve email but cannot send any. it freezes before i can delete and says non responding. Hi All, I want to re-raise the old issue of Fax numbers showing up in the Outlook Address book when one is sending an email. I know that this can be stopped by prepending the Contact's fax number with a letter so that Outlook doesn't see it as a valid fax number and therefore doesn't list it. What's always puzzled me, however, is that this fix doesn't work if the fax numbers are changed using an export to CSV...

Permanent Failure: Other address status #2
Howdy, I have a customer whose customers are receiving the following email randomly... > The following addresses had delivery problems: > > <> > Permanent Failure: Other address status > Delivery last attempted at Mon, 12 Mar 2007 19:42:42 -0000 My customer server is SBS 2003 Standard, latest Service Packs. How do I troubleshoot this? There is nothing the App/Sys logs near this time line. I have Symantec Mail Security for Microsoft Exchange Server installed as well and that doesnt have any log entries either. Also this response isnt a symantec respo...

Locate a specific row or column
Hi all, Could you tell me how to locate a specific row instead of using Mouse to dray the scroll bar? Clara thank you so much for your help In VBA code, you can use: Range("D100").Activate ' Or Range("D1:D100").Select ' Depending on if you want only one cell highlighted or a range of cells. -- Best wishes, Jim "clara" wrote: > Hi all, > > Could you tell me how to locate a specific row instead of using Mouse to > dray the scroll bar? > > Clara > > thank you so much for your help Hi Clara Have you tried goto in the Ed...

OK to delete Deleted Items folder?
I'm afraid I'll have to delete my Deleted Items folder in Outlook 2000. When I try to empty the folder I get a "The messaging interfce has returned an unknown error. If the problem persists Restart Outlook" message. Is it possible to delete the entire folder and replace it with an empty new one? Will it create any problems? TIA Henrik Not possible. Run scanpst.exe against your pst-file to scan it for errors first. -- Robert Sparnaaij [MVP-Outlook] Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Se...

Transfer of data #2
I have a database of information in excel and need a formula for compiling totals and transferring it to the main worksheet page. Basically it is a payment tracker - I put in todays date, account number, payment amount, etc and hit submit - it then sends this info onto the next worksheet page (the database). On the main page I have weekly, and monthly totals. I need it to update the weekly monthly totals based on the actual week and month - not last 7 days or last 30 days. How can i do this? Ultimately what it needs to do is go to the second page and grab all the info for the curren...

Microsoft Dynamics RMS Live Chat scheduled for May 7 #2
On Thursday, May 7th, 2009, the Microsoft Dynamics Retail Management System (RMS) team will host a Live Chat from 10 a.m. until 11 a.m. PT. In this chat, our experts will take questions on Service Pack 3 for Microsoft Dynamics RMS. If we get a high volume of questions during the chat, our experts might not be able to respond to all of them within time allowed. In that event, our experts will respond after the chat ends, to the extent possible, and their answers will be included in the transcript for the chat. The transcript will be posted to the Using Microsoft Dynamics RMS site appro...

How to delete chart
I created a histogram and want to delete it. I select it and the faint double border apperars. There are no square handles like in 2003. Then I press the Delete key. The faint double border goes away replaced by a single thin black border. The chart is still there and is not able to be selected at all. I entered "delete chart" in the Excel Help window, and there was nothing at all on deleting a chart. Ditto for "remove chart." I got no help searching on the internet either. I have Excel 2007 and Windows XP Professional When the border changes, can you press Delete a...