Moving Cells From A Row To A Column
Aug 26, 2009
it is possible to move a row of cells with (names in each cell) to a column. Basically, I want the list of names to go from top to bottom rather than left to right.
From this (each name is in separate cells)
John Jones Bob Smith Jane Morgan
to this:
John Jones
Bob Smith
Jane Morgan
View 9 Replies
ADVERTISEMENT
Nov 14, 2011
I'm trying to work out how to take all cells with data from multiple columns and stack them in a single column.
Here's the history...
I have multiple part numbers in single cells in column A. I perform a text-to-columns function. The resulting part numbers spread across multiple columns (say, B through K). Now I need to get all the part numbers, in their own cells, stacked in column A for one continuous list of single cell part numbers.
Is there a VBA option for cutting only the data cells from Column B-K and pasting the data at the bottom of column A while avioding blank cells?
View 4 Replies
View Related
Nov 7, 2009
I am running Win XP and Excel 2003.
I have a macro I found here on the boards written by Lenze to delete an entire row based on what is found in column A. I would like to delete any row where Col. B contains 10 or less characters and I have modified it to do so (or at least I think it does). My problem is that it takes about 12 minutes to run the macro (I have about 50k lines to run through). I was wondering if this is the fastest method or if it examines things other than just column B.
Sub Test()
Dim i As Long
LR = Cells(Rows.Count, "B").End(xlUp).Row
For i = LR To 2 Step -1
If Len(Cells(i, "B")) < 11 Then Cells(i, "B").EntireRow.Delete
Next i
End Sub
After this runs, I am left with Columns A to somewhere around AH. The columns are generally in the format of text followed by a numeric column. An individual text column has the same name through all of the rows. The numeric columns have varied values whether negative or positive.
Ideally what I would like: If a given cell (ie. C2) in Row 2 is numeric, then copy the cell to the left (ie. B2) into (ie. C1) and then delete Column B. I need this to work for multiple columns from B to C, skip D and E, and then from F to AG (and maybe beyond).
View 9 Replies
View Related
May 3, 2013
I have a pivot that includes customer data and I need to create an average for each row based on the first populated column for each customer. After one month of units appears for the customer, I need to calculate the average going forward, and if there are blanks after that they should be treated as 0 in the average. Below is an example of my description of the pivot.
Jan Feb Mar Apr
Customer #1 1 1 3
Customer #2 1 3
Customer #3 2 2
So, the average for customer #1 would be calculated from Column B to Column E, and factor column D as a 0 in that calculation. Customer 2's average would start in Column C and go to Column E, and factor column E as a 0 in that calculation. Customer 3's average would start in column D to column E.
View 5 Replies
View Related
May 3, 2007
I have a list of peoples first and last that I am trying to import into another application. My problem is that the application wants the first names in column A and the last names in column B. Right now my excel has the first and last names in the A column. I would just copy and paste, but there are 2,600! I just want to move the last word in column A to column B...
View 13 Replies
View Related
Jan 18, 2010
Is there a quick way to transfer the values from a column to a row? If so, does this have to be for the entire column or can you select part of the column and transfer it to a row?
View 2 Replies
View Related
Jun 6, 2008
how do I move the codes (1CH,1CL,1CP,1EM) from Column B to Colum A under Fee Earner cells where opposite the dates by using a macro?
View 9 Replies
View Related
Sep 23, 2013
I have an excel work book with 6 tabs. I would like to have Excel move an entire row from one tab to another tab (removing the row and inserting it in the other tab). I.e. Example I have a tab with items that are marked as "Open Actions" so if I were to change the drop down to close. Excel would move that entire row of actions to the tab with the "closed actions" and insert into the next available row. Now if someone were to come back at a later date say no it should be reopened than I would change the drop down to open and excel would move that row back to the open actions tab into next available row. I tried a PIVOT table and no good I played with few macro and not.
View 5 Replies
View Related
Oct 23, 2008
At this point, I have a list in the first column that looks something like the following:.......
First, I want to delete any cells that have two or more '' characters and delete any cells that do not have any text after the first '' character. Then I want to take the text before the character and put it in column B, deleting the ''. Once I have done these things, my original post and this one can be marked solved.
View 5 Replies
View Related
Jun 28, 2009
In my macro, I need to, from any column, move the active cell to column A, while remaining in the same row.
View 2 Replies
View Related
Sep 10, 2009
I need to move a number of rows, based on user input
in front of the first column, continuously until it 'flattens out' into one row..
And then do the procedure again for the next row
Kinda hard to explain.. maybe i'll use an example
using this matrix :
View 8 Replies
View Related
May 19, 2007
I need to look at column B find anything that Starts with BBX (ie; BBX124343, BBX1348383 ) and move it at the same location only to column A
View 9 Replies
View Related
Jan 9, 2008
I have data that is all in column A there are 8 pieces of information.
So client 1 info is listed from A2-A9, client 2 from A10-A17 etc. etc.
I set up A1-H1 to be the headers necessary.
How do I go about moving A2-A9 to A2-H2, then A10-A17 to A3-H3 etc. down through all the contacts which go down to A2400...
View 9 Replies
View Related
Jun 10, 2009
I have:
A1: Ph#
A2: Name
A3: Ph#
A4: Name
etc
I would like:
A1: Name B1: Ph#
A2: Name B2: Ph#
etc.
This is a large spreadsheet so I was hoping there was an easy way to make this change.
View 15 Replies
View Related
Feb 9, 2013
About half of the time when I move the contents of a cell I get the message "The Clipboard cannot be emptied. Another program might be using the Clipboard"
View 14 Replies
View Related
Nov 23, 2009
I am trying to move a group of cell containing formulas from one sheet to another, I have tried copy & paste/ ctrl & alt / paste special but for some reason the initial cell references of the formulas are not updated.
View 3 Replies
View Related
Dec 3, 2012
Starting on Monday and ending on Friday and then excluding the weekend dates beginning again on Monday. I would like to be able to store a value within a seperate cell.
EX:- Cell A1 contains the value of Cell B1,(B1 being Monday's value) but when the date changes so the value of Cell A1 should become the value of Cell B2 (Tuesday's value) and when the date changes again the value of Cell A1 should become the value of Cell B3,(Wednesday's value and so on). This should happen until Friday and then the calculation should evaluate the two days of the weekend and do nothing before moving on to calculating Monday's value and displaying in Cell A1 the appropiate value.
View 2 Replies
View Related
Apr 1, 2008
I have a excel spread with a range of A1:H64. The spreadsheet is designed for the user to enter information into the appropriate cells, i.e. user ID in cell D4; name in cell D5; and date in cell F5. My question is instead of the user scrolling around and finding the cells that require input is there a way to set the spreadsheet where the user tabs and/or uses the enter key to move around and go only to the cells that require input and not to the ones that are locked and protected?
View 9 Replies
View Related
May 8, 2007
I have a merged cell area, several columns wide and 2 rows deep.
I know that pressing enter before reaching the end of the first row moves to the next cell below. Is there any method, either key combination or whatever, of moving to the next row within the merged cell?
View 3 Replies
View Related
Oct 29, 2009
I need to move data from columns B & C into A without losing current data in column A (see attachment). I'm sure I know how to do this but cannot for the life of me remember how.
View 5 Replies
View Related
Feb 14, 2012
I use this macro to open a hyperlink in "column B" of the next row. However, it only works if I begin the macro from "column N" on the line above. (the hyperlink is always located in column B)
I want to be able to run this macro from any cell on the line above. How to modify it?
Code:
Sub Open_Hyperlink()
'
' Open_Hyperlink Macro
'
' Keyboard Shortcut: Ctrl+o
'
[Code]...
HTML Code:
ABCDEFGHIJKLMNO
1ActiveURLWhatDateFirst NameLast NameOtherOther2Other3Street1CityStateZip
2XLinkData112/21/2011BobSmithData2Data3Data4123 MainMooresvilleNC28117
3XLinkData112/22/2011LarryJonesData2bData3Data4456 MainMooresvilleNC28117
4XLinkData112/23/2011MaryAkinData2Data3Data4789 MainMooresvilleNC28117
An example would be to run it while Cell "I2", "J2", or "K2" is selected and have it open "B3"
View 2 Replies
View Related
Mar 13, 2014
I have a situation with a spreadsheet i'm working on.
Basically, when a button is pressed I want it to search for all rows which have a "yes" in an offload column (Column AS, on the sheet "Active") (So it can be yes or no).
If it finds a yes, I need it to move the whole row in to a new sheet called "inactive", then move the remaining results up.
I have taken and played about with a different VBA code, but i'm not sure it's even the right line!
Here is what I have :
Sub Refresh() ByVal Target As Range)
If Target.Column = 45 Then
If UCase(Target.Value) = "Yes" Then
Target.EntireRow.Copy Destination:=Sheets("Inactive"). _
Range("A" & Rows.Count).End(xlUp).Offset(1)
Target.EntireRow.Delete
End If
End If
End Sub
View 9 Replies
View Related
Mar 31, 2007
I have this macro listed below that finds all these files, copies cells from stat sheet and places them in sheet1 in another file. It keeps looping till all is found and done.
My problem is when it goes to paste in sheet 1 I want it to shift over a row each time.
Right now during the first pass it pastes in column B, I want it to start in column D
The issue seems to lie right under where it says "Put data into workbook"
Public Sub PullData()
Dim wkb As Workbook
Dim lngStore As Long
Dim strDate As String
Dim strName As String
Dim Book As String
Dim Sheet As String
Dim week As String
Dim Store As String
Dim IngRow As Long
Dim strCol(0 To 15) As String
strCol(0) = "b"
strCol(1) = "c"
strCol(2) = "d"
strCol(3) = "e"
strCol(4) = "f"
strCol(5) = "g"
strCol(6) = "h"
strCol(7) = "i"
strCol(8) = "j"
strCol(9) = "k"
strCol(10) = "l"
strCol(11) = "m"
strCol(12) = "n"
strCol(13) = "o"
strCol(14) = "p"
View 9 Replies
View Related
Jun 27, 2014
following code is supposed to check whether cell contains a value and based on that either display or hide a shape. The last couple of lines are moving it. What I would need is to check all cells in a row (not only the first one) and if lets say first 1,2,3...10... cells contain a value move the shape all the way to the end of that cell and so on.
VB:
Sub Worksheet()
If Sheets("Text").Range("z6") <> 0 Then
With ActiveSheet.Shapes("Rectangle 8").Fill
[Code].....
View 4 Replies
View Related
May 25, 2014
is there an option to allow cells under a pivot to keep the same distance under the pivot table when it grows larger or gets smaller?
View 1 Replies
View Related
Nov 1, 2007
I need to identify values which are less than 0 and move those cells to an adjacent cell.
Acct Desc Amt
2100 Acct1 -10
2101 Acct2 10
The -10 cell will move one cell to the right. I have an imported list with gl accounts, descriptions and amounts and want to have the negative values moved to a new column.
View 9 Replies
View Related
Jan 7, 2008
I have a list of diagnostic procedures, some of which are for the same patient. I need a macro that does the following: move every second procedure (a couple of cells per row) of one patient number (column B) next to (11 cells to the right and 1 row up) the first procedure. But only if there's less than 3 months between the procedures (dates are in column G) and if both procedures were on the same side of the body (left or right, column L)
Is there a macro that can do this for me?
Is there a macro that just moves a couple of cells in a row 11 cells to the right and 1 row up?
View 9 Replies
View Related
Feb 22, 2014
As I am at work, it does not allow me to upload the file due to restrictions on uploading. However, the spreadsheet is fairly simple so should be able to describe it.
The main sheet is called "Investigation Court Apps". An entry is made into each row and the status shows as "Open" in Column A, until a final closure date is input in Column Z, at which point the entry in Column A changes to "Closed". This is achieved with the following IF statement in Column A.
=IF(B3="","",IF(ISNUMBER($Z3),"Closed","Open"))
So that part is all automated. What I need is some VBA coding or macro (might be same thing but completely new to all this) that when the value in Column A changes to "Closed" the whole row moves over to "Sheet3". Once the row has been moved over, I want to ensure there are no blank rows also.
I have tried the following amongst others:
Sub MoveToSheet3()
Dim C1 As Range
Dim RowNum As Integer
For Each C1 In Sheets("Investigations Court Apps").Range("N1:N" & Range("A65536").End(xlUp).Row)
If Cll = 0 Then
[Code]....
I know to open VBA its Alt+F11 and to close Alt+Q, but thats about it.
View 4 Replies
View Related
Mar 28, 2012
in moving data from multiple columns to a single column. I have attached a sample image from an excel file which details the requirement. The first column contains a qualifier, that should remain constant when the data from columns B to the end move to a single column "B". The number of columns for each row is different, however, there is a maximum number, say 25. As mentioned in the image, when the data from columns B to the end is moved in to column B, column A is retained fixed, to the original value, and the original data below it is pushed below. Any pointers to how this can be achieved by VBA or without VBA?
View 6 Replies
View Related
Nov 2, 2009
I have been given a spreadsheet to fix as the user says the charts/graphs aren't adding the new data.
But when I looked closer at the workbook the whole thing just seemed a little wrong to me
Please see the workbook attached.
All the data is entered into the sheet 'Data Entry'.
Then on the 'Data' sheet it should pull thru some key values but half of it isn't done and it isn't very smart.
I have created a 'TEST Data' sheet so I could start messing with it.
I was going to pull the data thru from 'Data Entry' into the 'TEST Data' sheet using a Hlookup to make sure it worked before i messd with the actual 'Data' sheet.
The problem I am having is moving/copying the Hlookup across.
On the 'TEST data' sheet the Hlookup is as follows and is correct:
=HLOOKUP($A$5,'Data Entry'!$C$4:$M$472,2,FALSE)
But the next set of (Week 2) is not in the 2nd or even 3rd row of the array, its in row 11......... thats 9 rows down from the original.
Moving on the data i want to bring back is always 9 more than the last so the Hlookups should look like:
=HLOOKUP($A$5,'Data Entry'!$C$4:$M$472,11,FALSE)
=HLOOKUP($A$5,'Data Entry'!$C$4:$M$472,20,FALSE)
=HLOOKUP($A$5,'Data Entry'!$C$4:$M$472,29,FALSE)
etc etc
Can any of you guys out there help on how I can do this or it may not even be a Hlookup but something even smarter!!
View 7 Replies
View Related