Rearrange, Move Blocks Of Cells To New Columns

Apr 19, 2008

I saw a post that needed a solution for moving blocks of cells in order to get fewer rows but more columns. The post is gone but I'd like to think my work wasn't in vain as the algorithm was more difficult than I thought. The problem was wanting make a 5000 X 4 grid into a 1700 X 12 grid, 55 rows and 4 columns at a time. This is sometimes done for visiblity or printing purposes to get more data going across instead of down. An example would be wanting to have more data accross on a print page and the page holds 55 lines of data.

For example, A56:D110 would be moved to E1:H55, A111:D165 to I1:L55, A166:D220 to A56:D110 etc. The code is somewhat generic so different blocks of rows and columns can be specified. To see this code work, enter the number 1 in columns A-D, then fill series -> step by one for a thousand or so rows. Then run the code.

Sub FewerRowsMoreColumns()
'Rearranges blocks of cells so the end result is more columns and fewer rows
Dim RowStop As Long
Dim ColStop As Integer
Dim RowStep As Long
Dim ColStep As Integer
Dim RowOffset As Long
Dim rw As Long
Dim col As Integer

ColStop = 12 'Enter the last column number you want the cells moved to
RowStep = 55 'Enter the number of rows you want to move at one time
ColStep = 4 'Enter the number of data columns you are starting with.....................

View 2 Replies


ADVERTISEMENT

Macro: Move Blocks Of Cells From One Column Into The Succeding Columns

May 7, 2004

i think this will be simple for most of you. i need a macro that will move blocks of cells from one column into the succeding columns. say i have one column of 1000 values and i need to break that up into columns of 50.

View 6 Replies View Related

Move Blocks Of Data In 1 Column To Rows

Nov 15, 2006

Moving Data And Deleting Blank Rows. I am a complete newbie to excel VBA and require assistance (if at all possible). I have data in the following format in an excel sheet (I have a lot more rows but give an example for two rows)... in 1 column but I wish to separate it (i.e. move data along onto the first row in other columns) and delete blank rows.

For Example:

Col1
AAAA
BBBB
CCCC
DDDD
EEEE
AAAA
BBBB
CCCC
DDDD...............................

View 9 Replies View Related

Rearrange Rows Into Columns?

Jun 11, 2014

I have a report that lists the # of times an agent in a call center passed or failed their call based on specific guidelines. The report that's generated will not show the failed category if they didn't fail any calls. I've attached what the report looks like. I'm trying to format the report so that in column A I have the name, column B the passed calls and column C the failed calls. Column B and C can be interchanged...doesn't matter too much. If they don't have any failed or passed calls, I'd like a 0 to show up. I've tried messing with filters and INDEX/MATCH functions but can't make any headway.

View 2 Replies View Related

Rearrange Selected Columns Automatically

Jun 21, 2013

Daily I am getting a file which have so many columns with different names. I used to select and move my required columns to separate place. For exp.

I have the file with various columns, such are.

Sales Qty, Year, Tax, Company Code, Discount Paid, Sales Amount, Company Name

The above column order are not constant, daily the order will changes. But we have to make the order as below

Company Name, Company Code, Year, Sales Qty, Sales Amount, Tax, Discount Paid

Like this we have so many columns in the file and we used to rearrange as required.

Any formula or any macro to avoid this manual work with error, so that i will save my time and free from error.

View 2 Replies View Related

How To Rearrange Data Into Columns If It Is In Rows

Jan 15, 2013

I have an Excel sheet that is in rows. I want to separate the data into columns. Each sample is separated by a space in the rows. So sample 1 is A1 is the name and B1 is the actual name. A2 is the description and B2 is the description. Each sample is +or- rows. Sample 1 may be 8 rows but sample 2 may be 6 rows. What type of formula or macro do I use to arrange the samples into columns instead of rows so the data will be like A1 name, A2 description, etc... and A2 will be sample 2 name, and B2 will be sample 2 description, etc...

View 7 Replies View Related

Rearrange Dataset From Columns To Rows

Feb 23, 2014

Rearrange dataset from columns to rows

However, the solutions do not work if "species " are text instead of numbers:

Parcel
Species1
Species2
Species3

[Code]...

View 4 Replies View Related

Rearrange Columns In Particular Manner In A Table

May 9, 2014

I create a report where in I need to rearrange the columns in a particular manner as required by the client. Any macro which will will work as per following criteria.

Column headers start from A1 onwards (the last column header might vary depending on the creator, I get the report from a different team). The number of rows of data might vary.

For changing the order of columns, the macro should look for a column with the header "Close Date", cut it and insert is before a column with header "Bookings". Then, the macro should look for a column with the header "Description", cut it and insert is before a column with header "Selling BU". The macro needs to then cut two adjacent columns namely "Sector" and "Sub-Area" and insert it before the column with header "Total Bookings".

View 2 Replies View Related

Rearrange Data From Rows To Columns

Oct 7, 2006

I have an excel file with data that was entered in rows instead of columns and I need to rearrange the data into columns. Here's what my data looks like now, with what should be field names in column one and values in column two:

Company Name : Excel Company
First Name : Jack
Last Name : Smith
Phone : 555-661-6674
Email : ozgrid_rocks@excelgods.com
(this continues in a repeating pattern for thousands of rows)

I need the data like this:

Company Name : First Name : Last Name : Phone : Email
Excel Company : Jack : Smith : 555-# : ozgrid_rocks@url

View 5 Replies View Related

Stacking Of Columns In Blocks

Apr 19, 2012

I want to stack columns in blocks. Have not been able to work out a VBA code for the same. Let me explain the need:

- There are N columns of data, for e.g., Col. A, B, C and D has Data (total of 10 rows) ... 4X10 layout

- I want to stack columns in blocks as follows:

AB
AC
AD
... 2X30 layout

View 7 Replies View Related

Rearrange Table - Transpose Rows To Columns

Nov 2, 2007

I have problems to write a macro to rearrange the table from attachment file sheet1 to sheet2. I have many files that need to transpose rows to columns and with continually years, month, day, and the rest parameters. some to the files many content more then 20 years data.

View 5 Replies View Related

Rearrange Columns By Number Leaving Blank Spaces

Oct 16, 2013

I have a lot of numbers in different columns:

A B C
1 1 2
2 4 6
3 6 9
4 8 .
5 9 .
6
7
8
9
.
.
.

I want to to order them so they leave blank rows if they don't match...like this:

A B C
1 1 2
2
3
4 4
5
6 6 6
7
8 8
9 9 9
.
.
.

View 11 Replies View Related

Move Group Of Cells Over 4 Columns

Jan 21, 2009

I need to move a portion of info over 4 columns. I need to do this after a certain criteria is met.

A B C D E
1 Mem# Mem Name Sta Area
2 123C Joe Smith G bev
3 4 Wine 4.95 6
4 5 wine 5.95 6
5 2 food 6.95 5
6 124G Fred Choi C Bev
7 4 Wine 4.95 6
8 5 wine 5.95 6
9 2 food 6.95 5

A3, B3,c3,d3 need to shift over 4 clmns then when nxt member #(a6) is met rows below need to shift over 4 clmns until nxt mem #, so on and so forth. Please Help. New to the macro scene.

View 10 Replies View Related

Move Numeric Cells From X Columns

May 1, 2008

I have 2 large rows of data next to each other imported from a different programme. Some of the cells in these 2 rows consist of values, some consist of words. I only want to cut the cells with values in these rows and paste them in a new row, called TXid. I have written VB code that cuts all the data in the rows and pastes them onto the new row. Now I would like to cut only the values in the row. How do I select only the values in the cell?

Cells.Select
Cells.EntireColumn.AutoFit
Range("I1").Select
ActiveCell.FormulaR1C1 = "TXid"
Range("G3").Select
Do
If ActiveCell = IsNumber = True Then
Selection.Cut Selection.Offset(0, 2)
End If
ActiveCell.Offset(1, 0).Select
Loop Until ActiveCell = ""
Range("H3").Select
Do
If ActiveCell = Isnumber = True Then
Selection.Cut Selection.Offset(0, 1)
Loop Until ActiveCell = ""

The ActiveCell = Isnumber = true is not working the way I want it to.

View 9 Replies View Related

Rearrange (sort) Columns Based On Number In Column Header String

Apr 3, 2014

I want to rearrange(sort asscending) columns based on numerical value in column header string through VBA macro. Please check attachment.

i.e. (Present Data)
# A B C D
1 col.1 col.4 col.3 col.2

(Output Data )
# A B C D
1 col.1 col.2 col.3 col.4

test.bmp‎

View 2 Replies View Related

Remove Blanks Across Columns A Through E / Move All Populated Cells In Each Column To The Top

May 29, 2013

Some code that will remove blank cells from across five columns (A:E) so that after running code all data in each column moves to the top of sheet?

View 9 Replies View Related

How To Move Data In Various Cells To New Columns Based On Search On Primary Column

Feb 4, 2014

I have a sheet which I need to arrange and it looks like -

Column A
Column B
Column C
Column D

[Code]...

the values in Column B, C , D , E & F need to be in new columns based on what we have in Column A associated with "1"

Output should be -
Column A
Column B
Column C

[Code]....

so whatever is in Column A associated with "0" should remain in place whereas whatever is in Colimn A associated with "1" should get added to the new columns. 0 and 1 resembles the 1 Records which are used as a split to normalize the data.

View 9 Replies View Related

Rearrange Some Cells On Report Based Of Some Criteria Using IF Formula?

Sep 13, 2013

So I am trying to rearrange some cells on a report based of some criteria using an IF formula and getting Blank cells. Here's what I have:

LastRow = Range("A" & Rows.Count).End(xlUp)
With Range("P2:P" & LastRow)
Formula = "=IF($F2=""/FEDERAL EXCISE TAX"",$I2,"""")"
.Value = .Value

[Code].....

So I just want it to identify whats in a cell and populate a related value if the text is present. Do I need to change formatting to find Tex or something along those lines?

View 2 Replies View Related

Linking Blocks Of Cells Across Sheets

May 1, 2014

I have a master tab that has data grouped as follows

Column 1
title of a section (written once then left blank for the rest of a section)

Column 2
numerous descriptors (each in a new row)

Column 3
The response to the descriptors in column 2

I want to link entire sections from column 2 and 3 into different excel files so that if I make changes to column 2 or 3 in the master tab, the changes are made to all tabs. If there is a way, I'd like it if I add a row to the master, it is automatically added to the others.

View 2 Replies View Related

Counting Blocks Of Highlighted Cells

Feb 18, 2010

I have huge sheet with time periods across the top and accounts listed down. I have manually shaded cells red that represent "new" sales. I have used the custom function "colorfunction" to count these red shaded cells in the past. Now, I am trying to count blocks of cells. Each block is a different # of cells and represents sales $ over a different period of months. I want excel to count each block (start to end) ans add them up...

J F M Ap M....
acct 1

acct 2

acct 3

View 9 Replies View Related

Counting Blocks Of Highlighted Cells

Feb 18, 2010

I have huge sheet with time periods across the top and accounts listed down. I have manually shaded cells red that represent "new" sales. I have used the custom function "colorfunction" to count these red shaded cells in the past. Now, I am trying to count blocks of cells. Each block is a different # of cells and represents sales $ over a different period of months. I want excel to count each block (start to end) ans add them up... I can SEND THE SHEET IF YOU WISH....

J F M Ap M....
acct 1

acct 2

acct 3

View 9 Replies View Related

Split Address Blocks Across Multiple Cells

Feb 20, 2006

I have cells of block addresses that are delimited (tab I believe - there's a
small square that appears).

I need to split the addresses out into separate columns for each line of address. I tried using the Text to Columns wizard as suggested by Excel Help, but ended up with only the first line of address being posted in the cell to the right (the rest of the address was nowhere to be seen).

I'm sure I've done this before but can't for the life of me remember how I did it.

View 13 Replies View Related

Rearrange Side-by-side Columns Into Vertical Columns?

Mar 17, 2013

i have a sheet that contains side-by-side,below two formatted colums which has continuous weeks appearance(named PE sheet). i wanna to rearrange the colums to be a single top-down colums according to continuous weeks(named sheet2.are there any easier and faster techniques?a macro probably or a function? arrange(english).xlsm

View 1 Replies View Related

How To Create Expandable Cells For Large Blocks Of Text

Apr 25, 2014

create cells which could be expanded/shrunk, to either show the first sentence or so of the essay, or the full essay. I'd need to be able to expand/collapse each cell individually, not by row or column as the tutorials I've found have shown. I'm pretty sure I've seen this done with a little +/- sign in the corner of the cell but I can't find the option. It would be a bit like on a website that have show more, show less buttons.

View 2 Replies View Related

Blocks Of Blue Colored Cells And Want Them Surrounded By Lavender-colored Cells

Jun 29, 2007

I have large data sheets with blocks of blue-colored cells. I want to surround them with lavender-colored cells. Then I want to run a command to Clear Contents of all lavender-colored cells. Is this possible?

So first I have:
Black-text
blue-text
blue
blue
Black-text
blue-text
blue
blue
Black-text

Then I want:
Lavender
Blue
Blue
Blue
Lavender
Blue
Blue.................

View 12 Replies View Related

Sort Multiple Columns, With Blanks, And Move All Columns Into One

Feb 15, 2010

I found this code on Ozgrid to sort all columns of a worksheet that were continuous with no gaps or spaces that works well:

Sub CopyToA()
Do While ActiveCell <> ""
Range(ActiveCell, ActiveCell.End(xlDown)).Cut Destination:=Range("a65535").End(xlUp).Offset(1, 0)
ActiveCell.Offset(0, 1).Select
Loop
End Sub

However, I've tried to manipulate the code myself to 1) find all columns that aren't empty then 2) sort each column individually (WITHOUT expanding the sort to other columns) and 3) combining all the numbers into one seperate column. There are many posts concerning sorting but not one that addressed this particular situation.

View 2 Replies View Related

Move Data From 2 Columns Into Multiple Columns At Each Change

Feb 2, 2008

I am trying to write a macro that will take data from column A and use it as a column header in column C, and then take the corresponding data in column B and list it under the column header in column C. When the value in column A changes it will move on to column D and then list the corresponding data from column B underneath it in column D until all of the data in the 2 columns is spread across the worksheet. Example:..............

View 2 Replies View Related

Move Rows Of Data From Several Columns But Not All Columns?

Dec 18, 2013

Column A is numbered 1 -100 successively Column B thru D contains data that goes with the assigned number in column A. I need to be able to move rows of data in column B through D to a different set of rows all at the same time (not one cell at a time) without disturbing the set numbers in column A. And with that, have all the other rows of data automatically adjust accordingly(not to be deleted or replaced).

View 1 Replies View Related

Is There A Way To Stick A Few Row Of Cells Together So That When I Move One They All Move

Jul 7, 2009

is there a way to stick a few row of cells together so that when i move one they all move.. i have some rows that when i sort them i want them to move together with the other ones..

View 9 Replies View Related

Excel 2010 :: Move Part Columns Of Data From 6 Columns To Form 1 Large Column In Column A?

Jan 31, 2013

I have a large spreadsheet converted from pdf whose data still appears in A4 reading format.

I need to move part columns of data from 6 columns to form 1 large column in column A.

For example, move range B8 to B76 beneath range A8 to A76 and range C8 to C76 beneath that etc, page by page working through all 270 pages !

Also need to delete unnecessary 'page headers' throughout as in rows 2-6

View 2 Replies View Related







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