Cut And Move Rows - Macro

Nov 2, 2011

I need to cut 2 rows when i put "V" in E column, and then to paste them below row that have in column A, "OLD".

Ex:
I have many rows with data like this:

.......A..........B.........C.......D......E
1...subject
2...notes
3...subject............................."V"
4...notes
5...subject
6...notes
...

25..."old" row...............................

I need to cut the row with "V" in column E and the below row, and paste them below row with "old" in A column, like this:

.......A..........B.........C.......D......E
1...subject
2...notes

3...subject
4...notes
...

23..."old" row...............................
24...subject............................."V"
25...notes

View 9 Replies


ADVERTISEMENT

Macro To Move Rows And Organize

Mar 4, 2009

I have been trying to do this for 3 days using "Record Macro", but something always seems to be messed up. The main problem is that the worksheets are protected and the macro asks for the password.

Here is a calendar sheet that I've been working on. It contains the calendar on sheet 1(not important) and a client roster on sheet 2. The client roster gets filled quickly, and obviously gets unorganized. What I'd like to do is create a macro so that when a date is entered into column AA (when a client is discharged), that entire row is moved onto sheet 3 (Discharged). At the same time, I'd like all of the names in column A alphabetized.

I even tried to create an "Organize" button so that the users could just click it and alphabetize. The problem I ran into with that was that the users are using Office 2000, and the names get alphabetized but all of their information no longer matches up.

View 3 Replies View Related

Macro To Move Rows To The Bottom Of Sheet

Apr 24, 2009

I am attempting to write a macro so that when a user selects enters a particular selection in a cell, it will automatically move the entire row down to the last row and shade it in a different colour.

View 9 Replies View Related

VBA Macro To Move & Insert Rows And Average

Apr 6, 2009

I would like to have a VBA code to the following:Please note that the rows are dynamic and I need the results row for every customer.Currently it is totalling and displaying the results column at the botton of every customer but I need it at the start of every customer

1.When the new customer number starts the cells are shifted and moved one row.

2.Insert the results word and it displays the results thats displayed currently at the bottom,shoudl be displayed at the top where the row gets inserted in (1)

Current view:

Customer Date of POD Del date Diff Percent

123456 03.02.2009 03.02.2009 0 100
05.02.2009 10.02.2009 5 0
Result 0

(The result is that if all the rows are 100% ,the result row is 100% else it is 0%)

Preferred View:

Customer Date of POD Del date Diff Percent

123456 Result 0
03.02.2009 03.02.2009 0 100
05.02.2009 10.02.2009 5 0

View 9 Replies View Related

Excel 2007 :: Macro - Move Duplicate Rows From One Worksheet To Another

Jul 4, 2014

I am using Excel 2007 on Windows 7 Home Premium 64bit.

My Workbook contains 2 Worksheets, both with the same headings in row 1. Sheet2 is initially empty, except for the headings in row 1.

The following is a sample of the data in Sheet1:

[Code] ......

I want to create a Macro to operate as follows:

In the above sample data, rows 2, 4, and 8 are identical, so I want to copy rows 4 and 8 to Sheet2, and delete them from Sheet1.

Similarly:

Rows 3 and 9 are identical, so row 9 should move to Sheet2;
Rows 5 and 11 are identical, so row 11 should move to Sheet2.
Rows 6, 7, 10, and 12 are all unique, so should be unaffected by the Macro.

New records will be added to Sheet1 periodically, so the Macro will be used each time to move any newly discovered duplicates to Sheet2.

The Macro should make no assumption about how the rows are ordered, and should not change their order.

I have uploaded two Workbooks, such that Workbook1 shows the original data, and Workbook2 shows the result I want to obtain.

Attached Files :
Workbook1.xlsm‎
Workbook2.xlsm‎

View 14 Replies View Related

Excel 2010 :: Macro - Move Data From Rows To Columns

Dec 13, 2011

I am using Excel 2010 and need a macro that can convert data from rows to columns. I have read several posts about this subject but have no experience with macros and don't know how to change the macros to fit my scenario.

Here is what I currently have:

Account...Vehicle1...Loc1...Vehicle2...Loc2...Vehicle3...Loc3...Vehicle4...Loc4
11111......2008........FL
11111......2000........FL
12121......1999........GA
33222......2000........AL
33222......2011........AL
33222......2001........MS

Here is what I need it to look like:

Account...Vehicle1...Loc1...Vehicle2...Loc2...Vehicle3...Loc3...Vehicle4...Loc4
11111......2008.......FL.......2000........FL
12121......1999.......GA
33222......2000.......AL.......2011........AL......2001.......MS

There are up to 4 vehicles/locations per account number, and I need 1 account number per row (the dots above are for spacing only and not part of the actual data).

I could do this manually but because I have so many rows of data it could take days or weeks. Is there a macro out there that can do this??

View 3 Replies View Related

Delete Rows Matching Criteria & Move Rows

Aug 28, 2007

I have a worksheet in which I have sorted the data based in date and numbering (column I and E). I would like to create 2 macros for following actions:

1- all rows with the value "TOM" in column C will have to be deleted.

2- all rows with a value of 601 or 602 in column E, will have to be moved to the bottom of the sheet after the last row with data. The rows that have been moved will have to be sorted based in date (column I) and numbering (column E).

View 2 Replies View Related

Find Rows With Commas, Then Move Those Rows To Another Row

Jan 19, 2010

I've got an excel file with over 20,000 rows with Column A being having values of a "Vendor Number" while Column B has a "Vendor Name" Here is an example:

Vendor #Vendor Name
1001ABC Supply
1002Larry, Moe, Curly Inc
1003John Smith
1004Fred, Wilma, Barney LLC

I'd like it to find the rows where the Vendor Name has a comma present, and then put it in another sheet, or in another column like column C and D. If I can't get both the Vendor # and Vendor Name re-inserted someplace, that is OK. The Vendor Name is the big one.

View 2 Replies View Related

Add Numbers From 2 Rows,then Move To Next 2 Rows & Repeat

May 24, 2007

I have 3 columns and 200 rows. The first column is for Name of product. 2nd column for number and 3rd for $value of number of products. Have 200 rows. Have done a sort and checked. 2 sets of rows are for the same product name. I want to know if it is possible to add up values in 2nd and 3rd column, 2 rows at a time , then 4th and 5th column and so forth, by some formula rather than doing it manually?

View 4 Replies View Related

Move 10 Rows Down

Oct 14, 2006

I've got a rather simple question. I need a code which would activate a cell which is located 10 rows down from the currently active cell. I found this piece of code

Sub move()
ActiveCell.End(xlUp).Offset(10, 0).Activate
End Sub

but somehow it does not do the job it is supposed to do.

View 3 Replies View Related

Macro Request - If Macro Is Unable To Perform One Of Its Jobs Then Move Onto Next Line

Oct 3, 2012

I have a macro which refreshes a query when the spreadsheet is opened. This works fine when online.

However, if the user is not online, the query is unable to refresh and the macro just hangs.

Is there a code which will enable me to say " if unable to refresh then move on to the next line"?

here's the code below.

Private Sub Workbook_Open()
Sheets("Houselist").Activate
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("Front").Select
Range("A1").Select
End Sub

View 2 Replies View Related

Delete/Move Rows

Jan 10, 2007

I have a sheet that holds my inventory and has 3 colums. The colums are serialnumber, techid and date. I also have a sheet for each techid. Is there a way to delete/move a row of data if the serialnumber is entered on another sheet.

example.

I have a serialnumber added to my first sheet. I go to a techid sheet and enter that same serial number. Is there a way to copy the entire row the same serialnumber is on and copy to the current sheet? Possibly a search function where I enter a serialnumber and it finds the same thing on the main sheet and copies the rows into the current sheet.

View 9 Replies View Related

Move Rows Into Columns

Aug 11, 2013

I need a way to move every 7 rows into columns.

So rows 1-7 become columns 1-7, rows 8-14 into columns 1-7 etc.

View 3 Replies View Related

Move Data From 127 Rows To The End Of First Row?

Jun 18, 2014

I'm trying to adapt a macro written elsewhere on this forum for my purposes. I need to move 127 rows of data into one row. The macro written does exactly what I would like, except that it only works for 3 rows, rather than 127. How do I get this to work?Here's what I have so far:

[Code].....

View 3 Replies View Related

Move Rows Between Spreadsheets

Aug 26, 2008

We run reports from active directory to see user accounts that have not been logged into the network between 30 and 90 days. We have a few spreadsheets within a workbook (Investigate, Disable, Delete, No Action). All user accounts are imported into the investigate spreadsheet. What we would like to do is automatically take predecided accounts (service accounts that we do not log on to the network - only meant for services, etc) and move them from the investigate spreadsheet into the No Action spreadsheet. These accounts all start with svc. Generic accounts start with GEN and so on....

View 14 Replies View Related

Move And Delete Rows

Sep 21, 2009

I am trying to create a macro the looks at column A and moves the entire row to another worksheet or deletes the entire row based off of the value in each cell. Right now I have the Macro replace the downloaded values to either AG, G, GI, ICP, IMG or delete. The idea be to move all of the values with AG in column A to the AG worksheet, move G to the G worksheet, etc.. and then delete all of those with delete in the cell.

View 14 Replies View Related

Move Rows From One Sheet To Another ...

Dec 23, 2009

i learned how to highlight a row by placing an X in a single cell, my next question is:

Is there a way (most Likely there is) By placing "J/C" into a cell, make the entire row cut and then insert itself into my second sheet on row 2? "insert into a new row and not over existing information?"

now i have done this in the past using a Macro, select the row and then by pressing ctrl+k it would cut the row and then insert it into row 2 of the second sheet.

View 14 Replies View Related

Move All Rows 1 Down But Skip Row 26

Jan 21, 2010

I've got a pretty nice Worklist setup in Excel that enables you to organize all the work you need to do in a month. However i end up with little holes in the list whenever i finish a task because what my macroes does is whenever a job is marked as done on the list it moves that job to sheet2, which contains completed jobs. I'd like to have a macro that shifts all the rows 1 down whenever a job is completed(ill just call it from the job complete macro) but it needs to jump over(skip) row 26 because that row contains some images that my macros use. Altso i would like to, if possible avoid inserting any rows or cells or hiding them because that will totally mess up my macros :p I know i know, im not dynamic enough.

I've included a sample of the worksheet so you can see what i want.

By the way, I've altso got some trouble with a public function.

View 14 Replies View Related

Move Every Two Rows To Columns

Sep 22, 2012

I have data that I want to move to columns:

-----A
1 Apples
2 Bananas
3 Oranges
4 Watermelon
5 Grapes
6 Kiwi

It should move every two rows to columns, like so:

-----A------------B
1 Apples-------Bananas
2 Oranges -----Watermelon
3 Grapes-------Kiwi
4

View 3 Replies View Related

VBA - Deleting Rows And Move Up

Jun 4, 2008

I need to look into a particular cell on a specific column.

if this cell does not contain a number, then I need to delete the entire row, not column.

and then of course do this for 30K+ rows.

if sheets("sheet1").cells(x,7) is not a number ( dont know how to write this )

then delete row and move up.

View 9 Replies View Related

Move Page Down 10 Rows - Sometimes

Nov 27, 2009

I have cobbled together bits of code from around this forum to do what I need (thanks to all those I stole from!) but I'm stuck on the last bit.

I have a spreadsheet and the user types into an input box what they are looking for and the cursor moves to that position.

If the data is initially off the page when it is returned it is on the last row of the page I now see. Sometimes it may be appropriate to see data below it.

Is there anyway the found cell can always be shown about half way down the viewable page? (so that about 10 rows below are seen - obviously if the data is at the top then no movment is needed)

I tried the "ActiveWindow.SmallScroll Down:=10" but hit problems where the data was on a higher screen than the last search.

I am using excel 2000

View 9 Replies View Related

Move All Data Rows Up 1 Row

Sep 6, 2006

I created a macro that is supposed to copy the contents of about 500 rows, and move them all up one row. One of the things that is contained in those rows are a bunch of links to Microsoft Word documents. When I try to move the 500 rows up manually (just copying, and pasting one row higher), it works fine. The link remains entact.

However, when I use the macro I recorded, the link no longer works. It looks like it is there (the text used to represent the link is there), but when you click on it, nothing is there. Here's my code....

View 9 Replies View Related

Move Data From Many Rows To 1 Row

Nov 17, 2006

I have attached a sample file and would like to have the expected format as shown in the attached. Would greatly appreciate if someone could show me the faster way of reformating the data instead of doing it manually.

View 3 Replies View Related

Move Rows To Another Workbook

Apr 14, 2008

I have an original workbook. Also I have saved a "copy of the original Workbook". So the sheets and other headers are same. Now i want that If i delete a row in Original Workbook then the row should go out from origianl workbook and copied to "Copy of Orinal Workbook" in the same sheet from the the row is being deleted. Suppose row 7 of sheet1 is deleted, then the data of the row 7 from the original WB should go to row 2 of Copy of origianl WB (Being the first empty row. Similary if any row is deleted from sheet2 of Original Wb, the same should go to first empty row of Sheet 2 of Copy of Original WB. By this I want to keep a record of those rows which are deleted from the original Wb for future reference.

View 2 Replies View Related

Trying Move Rows By Date Newbie

Mar 24, 2009

I have built a workbook that tracks patient sat for my hospital. I have been manually entering the data and the workbook is fine. The worksheets are divided by month and evereything is fine. Now things have change and now I get a data dump from a handheld device. I think I can get the data to my into workbook I just need it to move to right worksheets by month.

The data comes to me like:
Date Sup Building Floor Unit Room Number
1/20/2009 08:30 Smith, John Med Center 01 Peds 120
and 10 other columns

I have tried everything from formulas to the advance auto filter. I have tried code with If - Then but pieces would move but not the whole row.

So basically I am lost. I am turning to you all to assit me in the first step.

View 8 Replies View Related

Macros To Move Multiple Rows To One Row.

May 19, 2009

This report spreadsheet is exported from SAP. Since SAP has a limit number of displaying the columns, there are 40 headings (= 40 columns) in the report has been broken down to 4 rows of headings.

How to use macros to move 3 those extra rows to one row and the number still matches each column? I also attatch the file for reference.

View 9 Replies View Related

Move Duplicate Rows To Another Worksheet

Aug 2, 2009

I currently have this code here that DELETES duplicate rows in the "Customer Number" column..

How can I modify this code to instead take any 2nd, 3rd, 4th, etc occurrence of a duplicate row and move it to a new worksheet named "Duplicates" and ALSO KEEP THE HEADER ROW?

View 10 Replies View Related

Move Text Into Columns From Rows

Aug 22, 2009

I have a set of data that has a store number in cell A1, the store name in B1 and then the store address in C1, C2, and C3. This pattern repeats for all ~300 stores. I am trying to get all of the store data on one row per store.

I have a set of data that looks like this:

View 6 Replies View Related

Insert Rows To Move Hyperlink

Sep 3, 2012

I have a workbook with 100 worksheets, and one TOC (table of contents) sheet. The TOC sheet is full of hyperlinks, linking to specific places in the workbook, and all other worksheets have a link that take it back to TOC sheet, selecting the cell that would link back to the sheet I just came from.

When I insert a new row, say above row 18, the links in all sheets that point to anything below row 18, point to a wrong cell now. Anything that pointed to A26 will continue to point to A26, but because of the row I inserted, the cell it should be linked to is now cell A27.

Is there a way to insert a row, and have all hyperlinks in the workbook adjust accordingly?

View 6 Replies View Related

VB Code To Move Rows Up Once Row Above Deleted

Jun 2, 2013

I have this code that removes a group of cells on any row that contains "Y" in Column L, but it does not move the remaining group of cells on a row up after the cells are deleted.

VB code so that when a range of cells are deleted, the row(s) below are moved up?

Sub RemoveReceived()
LastRow = Cells(Rows.Count, "H").End(xlUp).Row 'change "H" to the column that determines which is the last row
For x = LastRow To 4 Step -1 'assuming it starts from row 4
If Cells(x, "L") = "Y" Then
Range("H" & x & ":K" & x).ClearContents ' or use Delete

[Code] ........

View 2 Replies View Related







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