Excel 2007 :: Macro To Delete And Categorize Certain Data

Jan 10, 2012

What i have is a workbook that can have multiple sheets. Sheet 2,3,4 (if there are) are a continuation of sheet 1. First 2 rows of sheet 1 are headers and the last row of the last sheet (can be 2,3, 4....) is a footer. There are 14 columns (A-N) in each sheet. Col "N" has set status and col I has set names.

What i am looking for is a macro that can perform the following actions in the the set order:
1) deletes all rows where status in col N is "closed"
2) delete all rows where name in Col I is "Many"
3) if there are multiple sheets copy all data in 1 sheet once above 2 are deleted
4) I want to update cell A2, C2, I2, M2 & N2 with Hostel, Direction,Name,Flight & Status respectively
5) Create a pivot table with all data (Col A-N & Row 2 to last) in a new sheet and call it Summary - Pivot
I can then manually select how the pivot will look

Currently i am going through all sheets manually and filtering data. Using excel 2007

View 9 Replies


ADVERTISEMENT

Excel 2007 :: Macro To Delete All Data Before Pasting In New Stuff

Nov 25, 2013

I am using Excel 2007 and have a simple enough macro to paste data in to another sheet - simple is what I do best.

Sub Macro1()
'
' Macro1 Macro
With Sheets("data")
.Range("B3").PasteSpecial xlPasteAll

End With
End Sub

I am wanting to change this so that before it pastes any data into B3 it will delete all data from B3:AE22.

I have had a look around and found plenty to delete full rows or worksheets but not just to delete the data in those cells.

View 8 Replies View Related

Excel 2007 :: How To Delete 655000 Lines Of Data

Sep 21, 2012

I have a public/shared Excel 2007 workbook on our network and someone colored an entire column yellow. When that happened, it increased the number of rows to over 655,000. I didn't know that was posible but they are there... The thing moves very slowly now and when I try to delete (45,000 lines at a time), I either get a error window telling me I don't have resources to perform the operation, or I do smaller chucks and after 30 minutes deleting lines, it will not save.

I would rather not have to recreate the whole workbook if I can delete the lines on this one page.

View 9 Replies View Related

Excel 2007 :: Move Data From Multiple Rows To One And Delete?

May 2, 2012

I'm working in Excel 2007 and need to move data from multiple rows to a single row if the ID matches.Below is sample data I would be working with. I want to move data from columns F-U to the right of the original data in the row above it. I would also like to delete the rows that had data moved.

GIDSurnameNameEmployee Number OriginalDate of birthGranting ARE
Employing ARECountry Employing ARECHCM Supplier IDVehicle
Investmt. shares / Awards at termination dateMatching Shares
at termination dateTermination

[Code]....

View 3 Replies View Related

Excel 2007 :: Macro For Merging Data Of Alternate Rows?

Jul 7, 2014

Currently I am using Excel 2007. I want to merge data of alternate row of a particular column in Excel.Also i want to remove merged row. E.g.

Name City Pincode
John Mumbai
John 400009
Carol Delhi
Carol 110001
Carol Pune
Carol 411079

I want output to be ----->

Name City
John Mumbai-400009
Carol Delhi-110001
Carol Pune-411079

macro/formula for the above requirement..?

View 11 Replies View Related

Excel 2007 :: Data Validation List Crashes VBA Macro

Feb 28, 2012

I have a VBA macro for Excel 2007 below that loops through a workbook and deletes a picture (shape) in a range at the top of each worksheet.

The macro works fine until a cell which contains a seemingly unrelated data validation list on Sheets(1) is changed. The macro then repeatedly trips up with a 'Run-time error 1004 - Application defined or object defined error'.

The cell with the data validation is outside of the range in which the shapes are deleted and does not set any of the variables in the macro.

Sub DeleteLogos()
Dim Count As Integer
Dim NumberOfWorksheets As Integer
Dim Logo As Shape
Dim LogoZone As Range
NumberOfWorksheets = Worksheets.Count
For Count = 1 To NumberOfWorksheets
With Sheets(Count)

[code].....

View 4 Replies View Related

Categorize Data By Dates

Dec 19, 2006

I have a report which is pulled on a daily basis. I need a macro or a code which searches for the day, one day before the present day, and then custom "Current Day Document Count In" column such that it does not contain "0" and then copy the entire content and then paste in the second sheet. This should be repeated for two days before the present day too. I have attached the spreadsheet, where the first one is the report, second one is where I need the output to be. I have also attached one more "output" sheet to show how the report should look like. I tried to Record a Macro which sticks to the present number of cells, but cannot be used on a daily basis.

View 5 Replies View Related

Categorize Data Table

May 20, 2008

I have a excel file with huge collection of data. There are 5 coloumn.
1st is for Business name 2nd. Region 3. Town 4th. Telephone No and 5th.Category.

Now I want to insert category name automatically in that Category Field for each business. There are 4 type of business.

1. Ristorante
2. Residence
3. Agriturismo
4. Pensione

Each business name has above words at thier end. Look below you will get an idea how they look like actually.

1. Mare Blu' Di Pistocchi Vincenzo Ristorante
2. Riviera dei Cedri Residence
3. Le Terrazze Agriturismo
4. Daulia Hotel - Stella Maris Pensione

So, is it possible to populate the Category Coloumn automatically based on the name of the business.

View 4 Replies View Related

Excel 2007 :: Macro Or Formula To Create Summary Of Data In Various Worksheets

May 5, 2014

I'm trying to update a the summary sheet that will run through the 10 worksheets and bring back the entire row (or the columns I specify) that matches the creteria MS.

MS will appear against each row in the same column in all the tabs.

So in the summary sheet I would see all the rows individually that appear in tabs 1-10.

Excel 2007.

View 9 Replies View Related

Categorize The Data Based On Thier Value

Oct 9, 2008

I have a problem using the if formula with comparison operators. I have a range of fields for geographic areas and the values in these fields are a percent. I want to categorize the data based on thier value.
For example:

If the value in the cell is between 0 and 9.9 percent, I would like the catagorize this as a "1" and so forth.

The entire categories I have are:

0-9.9% = 1
10-30% = 2
30.1-39.9% = 2,5
40-60% = 3
60.1-69.9% =3,5
70-100% = 4

Using the if formula I know how to obtain an answer if the condition is exact -if(A1=0:1:A1) but I would like to enter a range of values for the comparison such as
-if A1 is between 0 and 9.9 then 1, if A1 is between 10 and 30 then 2 etc.

View 3 Replies View Related

Excel 2007 :: Macro - Match Data And Copy Rows To Existing Sheet

Jan 11, 2012

I've already found a TON of threads about this process but nothing that matches specifically what I'm trying to do.

I have a spreadsheet that I'm using to auto fill other tabs with data that only matches specific criteria. Here's what I'm looking to do:

Columns I, J, K, and L may be marked as either Y or N (or blank). I have different sheets that require 1, 2, 3, or 4 of those columns to match Y. For example, on sheet 2 I want to copy the entire row if there's a "Y" match on column I and J. On sheet 3 I want to match "Y" against, I, J, and K. Sheet 4 I need to match only L, etc.

I need the data copied into the existing sheets to start on row 7. I have other data on rows 1-6 that cannot be moved.

I'm running Excel 2007.

View 5 Replies View Related

Excel Macro For Find And Delete Specific Data?

Aug 20, 2013

I need a Macro that will search all of the cells for specific text, and delete all cells containing the text. I prefer to make a list of the specific texts and run macro to find all of them and delete all cells containing the text. I need to be able to add some more text into the list in future.

View 9 Replies View Related

Convert The Data By Input And Categorize Into Month In Another Worksheet

Nov 16, 2008

am currently a QE using the following data for my report generation:
Date - Week - #Inspected - #Failed
Want to pull data into ANOTHER WORKSHEET from this one wherein the format will be :

Month - #Inspected - #Failed

Indirectly want Excel to directly convert the data by input and categorize into Month in another worksheet (will be linked and would be great if according to the date it could calculate the week as well)...so if somebody inputs defects by date it should automatically cumulate into respective month.

View 7 Replies View Related

Excel 2007 :: Delete Red Rows Only

Aug 13, 2013

I have a large file with a bunch of color coding and need to delete my red rows only.

View 3 Replies View Related

Excel 2010 :: Macro To Delete Last Line Of Data In Each Worksheet In Workbook?

Apr 24, 2014

I'm trying to create a macro that will look at each worksheet in a workbook and then delete the last line of data on each worksheet. The last row can vary on each worksheet. This is what I have come up with but it is not working. I am on Excel 2010 and Windows 7.

Sub Macro1()
Macro1 Macro
Dim ws As Worksheet

[Code]....

View 2 Replies View Related

Excel 2007 :: Cannot Delete Column By Right Clicking

Dec 3, 2013

In any open (new or existing) workbook (Excel 2007), I cannot delete a column by right clicking the column header and highlighting the entire column. The "delete" word is greyed out and not selectable. I CAN however still delete a column by going to the "Cells" toolbar, then "Delete" pulldown menu, then "Delete Sheet Columns". Right clicking the column header is much simpler and easier.

BTW, I can still delete rows by both methods of right clicking on the row header and by going to the Cells toolbar.

View 5 Replies View Related

Excel 2007 :: Delete Sheet Greyed Out

Jan 13, 2009

I am using excel 2007 and when I right click on the worksheet tab, delete is greyed out. My workbook/sheet is not shared. I also had the problem owith row and columns. CommandBars("row").Reset sorted that out but I can't seem to sot out the tab issue.

View 6 Replies View Related

Excel 2007 :: How To Use Or Delete A Table (ListObject)

Jan 11, 2012

I am using Excel 2007 and I created a table (i.e., listobject) using the macro recorder as follows:

Code:
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$3:$J$50"), , xlYes).Name = "MyData"
Questions:

1. How do I delete this table via VBA?

2. How would I check to see if this table already exists so it follows this logic:

If "table does not exists" then
'create it (using the line of code above)
End If

View 3 Replies View Related

Excel 2007 :: Delete Sheet On A Shared Workbook

Oct 29, 2013

I have a file that has an original file format .xls

I saved as .xlsx (I am using Excel 2007) with a different name so I could make changes to the new file without changing the original.

That turn off compatibility mode.... but it is still "shared". While it is shared I cannot delete a sheet. In fact, I really don't even want it to be shared. If the file is open, and someone else opens it, I want it to open as "read only". I cannot uncheck the "Allow changes by more than one user at the same time. This also allows workbook merging." checkbox because it is greyed out.

View 3 Replies View Related

Excel 2007 :: Need To Automate Find / Delete Process

Jan 9, 2014

I have two spreadsheets. one contains a master list of computer names. the other contains a list of computer names to be removed from the master list (exception list).

I need to go through the master list and remove any computer names that are on the exception list- for example, if 'computer1' is in the exception list, i have to find and remove 'computer1' from the master list.

The exception list is quite long, and I want to automate this process if possible. not sure how to achieve this.

I'm using Excel 2007 Standard.

View 4 Replies View Related

Excel 2007 :: Find And Delete Single Character?

Jan 23, 2014

Following the tips doesn't allow to remove a character.

I exported email addresses from Outlook and they have the following character ' in front of the email address.

Using Excel 2007.. it says :"check if your search formatting and criteria are defined correctly. If you are sure that matching data exists in this workbook, it may be on a protected worksheet. Excel cannot replace data on a protected worksheet"

So I made a new file, and copied and pasted the cells into the new spreadsheet.. same message.

View 4 Replies View Related

Excel 2007 :: Delete ALL Connections In Workbook Without Having To Specify Names

Oct 20, 2008

The following code deletes a specific connection in a workbook:-

ActiveWorkbook.Connections("text123").Delete

How can I code this so that I can delete ALL connections in a workbook without having to specify the names (as these will always be different).

View 3 Replies View Related

Excel 2007 :: Delete Rows If Value Is Found In Column S

Jan 23, 2012

I'm using this code to find values of "FEP MHS" or "LSD MHS" in column S and if column S containes either of these values it deletes the entire row from the spreadsheet. I need this to work on a spreadsheet that runs on a daily basis and each day it contains a different number of rows. I have used this code to successfully delete most rows that contain these values in Column S but for some reason it does not delete all the rows, typically leaving 6 - 7 rows that contain these values. I'm using Excel 2007 I need code that finds the last row used and deletes the entire row if these values are present.

Dim CelRSLHMHSD As Range, RngRSLHMHSD As Range, iRSLHMHSD As Long
Set RngRSLHMHSD = Columns("S").SpecialCells(xlConstants, xlTextValues)
For iRSLHMHSD = RngRSLHMHSD.Count To 1 Step -1
If RngRSLHMHSD(iRSLHMHSD).Value = "FEP MHS" _
Or RngRSLHMHSD(iRSLHMHSD).Value = "LSD MHS" _
Then RngRSLHMHSD(iRSLHMHSD).EntireRow.Delete
Next iRSLHMHSD

View 1 Replies View Related

Excel 2007 :: Delete Column If Cell Equals To Zero

Aug 6, 2012

HTML Code:
Sub DeleteEmptyColumns2()
Dim Cell As Range
For Each Cell In Range("4:4")
If Cell = "0" Then
Cell.EntireColumn.Delete
End If
Next Cell
End Sub

I am attempting to remove columns in my table of data, using the above code seems to remove some them but not all, is this the best way to loop through a range?

View 8 Replies View Related

Excel 2007 :: Find Certain Named Columns And Delete Them

Jun 14, 2013

Macro code to find several column names in row 1 (which can be anywhere in the work sheet) and delete them e.g. date, month, code, amount etc.......

Excel version 2007

View 4 Replies View Related

Excel 2007 :: Method Delete Of Object Range Failed

Oct 3, 2011

I have written a sub with the purpose of finding rows based on a critieria, copying the rows to another worksheet and deleting the original row.

The code:

Code:
Sub MoveToIgangvaerende()
'
' Flytter opgaven til sheetet Igangværende projekter
'
Dim i, j, Index As Integer
Forfra:
For i = -1 To 1000
If Sheets("Pipeline").Cells(3 + i, 20) = "Ja" Or Sheets("Pipeline").Cells(3 + i, 20) = "ja" Then

[Code] ......

I get the error message "Method 'Delete' of object 'Range' failed" at the line "Sheets("Pipeline").Cells(3 + i, 18).EntireRow.Delete".

The sub has previously worked perfectly fine.

View 4 Replies View Related

Excel 2007 :: (Cannot Complete Task With Available Resources) When Trying To Delete Rows

Jul 11, 2012

I have VBA code that attempts to delete an entire row from my worksheet:

Code:
Cells(3,1).Select
Selection.EntireRow.Delete

This works fine on small data sets, but on larger data sets it gives me the error message, "Excel cannot complete this task with available resources". This happens even when I try to do the deletion manually (without VBA code). Clearly, the code itself is not the problem.

My document has about 250,000 rows and 2,500 columns. While this is big, it is significantly smaller than Excel's documented limit of 1,048,576 rows and 16,384 columns.

I am using Excel 2007. My computer has 2GB of RAM but even when I try it on a computer which has 8GB of RAM it gives me the same error. If I "ClearContents" instead of "Delete" it works fine. For my purposes, however, deletion is entirely necessary.

View 9 Replies View Related

Excel 2007 :: Search Worksheets And Delete Entire Row When Duplicates Found?

Jul 17, 2013

I have a excel 2007 workbook that has 5 sheets "MASTER" , "RED" , "WHITE", "GOLD" & "BLUE". There are 7 columns in each sheet and the master has about 8,000 rows . In column D of each sheet there is a unique number (approx. 8 - 10 digits ) that I would like to at the press of a command button search through sheets "RED" "WHITE" "GOLD" & "BLUE" against the unique numbers in the "MASTER" sheet and if there any duplicates numbers delete the entire row but leave all the data in the master sheet.

View 2 Replies View Related

Excel 2007 :: VBA Code To Delete Rows Based On Text Starting Content

Oct 25, 2013

Using excel 2007. I am interested in writing a VBA code to delete rows based on the text starting content. I would like to delete rows with cells that do NOT start with an "S" or "SA"

EX:

05S0128
06S0112
05S2298
S25852
S36963
SA36185

I would only like to keep the last 3 lines.

View 3 Replies View Related

Merge Macro Excel 2007

Nov 30, 2007

The code to merge sheets to a master sheet runs great, however when I copy the code to the Personal.XLSB to have the macro available to use on every workbook I’m getting an error. The line of code is Application.Goto DestSh.Cells(1) and the error is Method ‘Goto of object’_Application’failed. This happen even if I create a new workbook with 3 sheets and only a few cells with information. The macro to mail the sheet works fine using the Personal XLSB.

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved