Looped Transposing Macro

Mar 2, 2007

I work on some High-throughput Projects analyzing biological samples. The software we use for analysis spits out the data into excel. This is all well and good, being mostly automated. However, my issue arises when I get the output data. It's simply one long list of values in a single column. This could potentially be 384 entries. Depending on the parameters of our experiment, I'd like to be able to take a set number of consecutive entries and transpose them to another worksheet. However I don't know how to loop the function to get the specific entries transposed to their specific worksheet. I'm pasting a recorded macro I made to illustrate my point.


Sub HTSoutput1()
'
' HTSoutput1 Macro
' Macro recorded 3/2/2007 by Jack Rosa
'
' Keyboard Shortcut: Ctrl+q
'
Range("B2:B9").Select
Selection.Copy
Sheets("K562").Select
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "2330"

This would have to be repeated for a column that contains 312 entries so that I end up with each destination worksheet containing a 13row x 8col table (or should it be called an array?).

View 9 Replies


ADVERTISEMENT

Delete Rows Of Data In A Macro (looped)

Nov 18, 2009

I receive spreadsheets each month in the same format. It is effectively 6 rows of titles, 7 rows of weekly data, 2 rows of weekly summary, 3 blank rows then it repeats itself with the 6 rows of titles etc... down the page for 8 or so weeks.

I wish to create a (looped) macro that will leave the top set of titles and the 7 rows of weekly data (Mon to Sun) then delete the next 11 rows and so on and so forth to the end. I will then be left with the intro to the dataset followed by a whole months worth of data in continuous format as opposed to weekly summarised sections. But I am stuck as my macro knowledge is basic and I can only record macro's not program VBA.

I can create a macro and manually delete all entries for one spreadsheet but would rather have a code to do this than can run (x) amount of times in case the size of data changes. When it deletes section by section, the cells move up and the row numbers change.

View 3 Replies View Related

Macro For Transposing Data In Cells

Dec 24, 2008

I need a macro that can do this in 1run.

Turn a sheet from, Row 1 would repeat as column A.
Acupressure Allergies Anxiety - Depression accupressure alergies anxiety therapy accupressure therapy allerg relief anxiety treatment acupressure allergen depressed acupressure chiropractic allergic depression treatment acupressure doctors allergies treating anxiety acupressure massage allergies asthma treatment for depression acupressure practitioner allergies cats Bipolar acupressure therapy allergies dogs Bi polar acupressure treatment allergies hives Dysthymic disorder chinese acupressure allergies medicine

View 9 Replies View Related

Creating Looped If Statement

Nov 22, 2012

I am working on creating a looped if statement but can not get it working.

I have 3 columns:

D3:D50 = Application ID
G3:G50 = Sorted
H3:H50 = PasteCreate

Column D contains unique records, however the first 6 characters could be the same so I have used the Left statement (=LEFT(D3,6)) to sort by this in column G.

Application ID

Sorted
PasteCreate

ES0920.21

ES0920

[Code] .........

What I want it to do is to go through the list and Match the first 6 characters of cells in coloumn D:D create a new worksheet and name it the first 6 characters then copy (in the case above it would create 2 new worksheets that would be called ES0920 and ES1341.

ES0920 would have all the ES0920... names pasted into cells A2:R2 and ES1341 would have the 2 ES1341... names pasted into A2 and B2

The list of EStext will continually change. but will always contain ES followed by 6 or more numbers.

View 3 Replies View Related

Reorganizing And Transposing Data Through Excel Macro

Oct 13, 2012

Reorganizing data, that would probably be best achieved with a macro. I've attached a file that represents my situation fairly well. There are 2 tabs, an Input and Output tab.

The input tab has Names along the left side, that may change in number frequently. Then along the top I have metrics, and values corresponding to the names. What I need a macro to do is to basically create an "entry" in the Output tab for each value.

The output tab is in a specific order, but basically there are 8 columns. The 4 unspecified columns don't need to be filled. The other 4 represent data from the input tab. The "Metric Value" can simply be filled with 0s for now.

Excel - VBA Assistance.xlsx

View 5 Replies View Related

Transposing Macro: Take A Set Number Of Consecutive Entries And Transpose Them To Another Worksheet

Mar 3, 2007

I work on some High-throughput Projects analyzing biological samples. The software we use for analysis spits out the data into excel. This is all well and good, being mostly automated. However, my issue arises when I get the output data. It's simply one long list of values in a single column. This could potentially be 384 entries. Depending on the parameters of our experiment, I'd like to be able to take a set number of consecutive entries and transpose them to another worksheet. However I don't know how to loop the function to get the specific entries transposed to their specific worksheet. I'm pasting a recorded macro I made to illustrate my point.


Sub HTSoutput1()
Range("B2:B9").Select
Selection.Copy
Sheets("K562").Select
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "2330"
Sheets("Nuclei").Select
Range("B10:B17").Select.............

View 9 Replies View Related

VBA - Looped Code Doesn't Populate Correct Cells On Certain Sheets?

Feb 18, 2014

The code below works correctly on certain sheets. The code is supposed to loop through worksheets in an array, calculate the percent change from 1990 to 2012 and from 2005 to 2012, and put the calculations on the 4th and 5th row from the last non-empty row, respectively. All the sheets are identical except for 3. The sheets that are different only have a different number of years of data. For some reason this causes the macro to put the percent change calculations in random rows below the correct location. Also, the macro doesn't work correctly on one of the identical sheets.

[Code] ......

Example of how the macro runs correctly on an identical worksheet : correct.gif

Example of how the macro runs incorrectly on one of the 3 sheets that are not identical : incorrect.gif

View 6 Replies View Related

Looped Error Check Not Working: Error 1004 Is Generated When A Match Cannot Be Found In The Spreadsheet

Jul 2, 2006

the if stattement works perfectly and does exactly what i want except when it comes to the else part. if there is no error the statements are run perfectly but if there is an error (in this case the error is generated when a match cannot be found in the spreadsheet) the else statement doesnt kick in and post the msgbox.
the code just crashes. and returns an error 1004 on the line i have highlighted in yellow

res = WorksheetFunction.Match(invvar, Columns(1), 0)
If Not IsError(res) Then

Me.txtClientID.Value = ws13. Cells(res, 7)
Me.txtNumber.Value = ws13.Cells(res, 7)
Me.txtDate.Value = ws13.Cells(res, 8)

'save client id as a variable
'Print to invoice------------------------------------------------------------------.....................

View 6 Replies View Related

Transposing The Data

Aug 7, 2009

I have a user form which I would like info entered into various text boxes to be assembled in a way which can be copy and pasted. See the attached example to see the results I am looking for.

View 2 Replies View Related

Transposing A Data Set

Nov 18, 2009

I have been trying to transpose a data set. Transpose formula is not working with this data set. How should i proceed ?.

View 4 Replies View Related

Transposing An Array

Nov 18, 2009

I want to transpose the data set. I am using the following formula

HTML
INDEX(Dataset!$B$2:$Y$13366, MATCH(B$1, Dataset!$A$2:$A$13366, 0), MATCH($A2, Dataset!$B$1:$Y$1, 0))

But there seems some problem with the reference of year (I want the range will change From A2:A15 then it will start from A17:A31 like this until my row ends at 13366).

View 4 Replies View Related

Transposing Links

Nov 10, 2005

I have very large sections of data which I need to transpose as links.
Problem is that the copy/paste links function cannot be followed up with the
copy (the linked cells)/transpose option, without having the transposition
screw the links up.

View 9 Replies View Related

Transposing In Blocks Of 10?

May 19, 2014

I have a list of numbers in Col.A which can be variable in length.The objective is to copy these numbers into Columns with 3 col gaps in between.So the objective is that these numbers are listed horizontally (with 3 col.gaps separating each nr).To achieve this I have written the script below. However, as the orig.list of p/ns in Col.A can be variable, I would like to perform the transposing in blocks of 10 numbers.The transposed end product should be listed 10 numbers in each row (with 3 col gap between)rather than in one row. how to modify my vba script to do the above?

Code:
Sub TransposeSkippingColumns()
Dim c As Range
Dim i As Long

[Code]....

View 8 Replies View Related

Transposing Grades In New Sheet

Apr 2, 2009

I have an excel spreadsheet with my students' grades on it. I want to be able to click on a student's name and have a list of all the assignments, along with only that student's corresponding grades, transposed on a new sheet so that I can print out to give to a parent.

View 13 Replies View Related

Transposing A Table View

Oct 29, 2009

see attached WB.

Preferable solution using only Sheet Formulas only.

View 11 Replies View Related

Transposing Without Using Transpose Formula

Feb 18, 2009

I am aware there is a transpose function, however I do not want to use this as you are unable to change an array easily.

What I would like to do is create a formula that selects A2:A5 and transposes this in cells B1:E1 as shown below.

View 6 Replies View Related

Concatenating And Transposing A Row Of Numbers

Jul 13, 2006

I have a column of numbers going down the sheet in column A.

I need to concatenate all the numbers in each cell in the column and
separate each by a comma. This would then be displayed as a long list
all in cell B1.

View 14 Replies View Related

Transposing Data...again In Another Dataset

Dec 19, 2009

I was recently helped very much by the forum moderator and code from D_Rennie in a file to transpose about 25,000 rows into a few organized columns. The code worked very well. I have a slightly new twist on the problem. I have uploaded a different file with a different data structure in the columns but the same need for the data to be transposed to the columns under the same headings. This VBA worked very well before, but I can't seem to re-use it for this new dataset.

View 8 Replies View Related

Sorting Data And Then Transposing It?

Dec 20, 2011

I have a set of chemicals from groundwater tests at various wells. I need to sort the data, but chemical names can prove to be frustrating, since often times numbers or letters are found before the chemical name. Essentially, I'm trying to sort like this example:

Further complicating things is that at the end there's a (m,p-Xylene) and (o-Xylene) thrown into the mix.

Is there an easy way to do this sort? I imagine I'll have to have some sort of reference list that the sorting looks to?

After I sort it and do some data manipulation, I have a macro that transposes the data like the example below:

Here's the macro:

Sub Step4_ReorgData()
Dim w1 As Worksheet, wR As Worksheet
Dim c As Range, LR As Long, NR As Long, NC As Long
Application.ScreenUpdating = False

[Code].....

View 9 Replies View Related

Transposing Rows To Columns With VBA

Apr 24, 2013

I ve got a similar issue with converting the rows to columns... At the file I attached below, I need to convert to columns some sort of data which is organized as rows. They are all set up as 12 cells in a row and I need to convert them to a single column which keeps the time references of the data. I mean, both of the data and their years will be needed for my aims, but it is not important to keep the years columns with dataset, as long as rows are literally converted to columns under their order.

I actually found a vba macro on the net but it doesn't useful at all when it comes to keeping all data in their original order. It has some specific design to solve the issue without the aim of keeping the data in its original order I guess. Is there any possibility to modify its code or any other way to do this?

Code:

Sub Data_to_Column()
Dim rData As Range
Dim r As Range, c As Range
Dim rStart As Range
Dim counter As Integer

[Code]...

View 1 Replies View Related

Transposing Every 10 Cells In A Column To Row

Dec 7, 2013

I am working with a huge database and need to transpose every ten cells in a column to ten rows.

Below is what I would like it to do, currently columns 90-0 are blank and I am trying to get a script to do it as I have over 550 subjects.

Subject
EconSlideQ6.RESP
90
80
70
60
50
40
30
20
10
0

[Code] .......

View 9 Replies View Related

Looking Up Data And Transposing It In Array?

Jul 14, 2014

I have two columns of data of which I need to transpose into rows. Sounds easy enough but the data looks like the following:

Business Role
Person
Accounts Payable Voucher Reviewer
SMITH,JOHN

[Code].....

I have read some sites talking about index and column or using VBA.

View 6 Replies View Related

Transposing Noncontiguous Cells

Feb 22, 2008

Is there a function or VBA out there that would allow me to transpose non-contiguous cells? For example, say I want to transpose ther contents from cells A1, C1, E1, G1, and I1 on worksheet 1 to A1:A5 on worksheet 2.

View 9 Replies View Related

Transposing Rows To Columns ...

Jan 9, 2009

I have a spreadsheet like the following, in 2 columns: ...

View 9 Replies View Related

Transposing Rows To Columns

Dec 30, 2009

I have 9 worksheets with 80 wells listed and Jan thru Dec prod for each well.

The current format is: ...

View 13 Replies View Related

Transposing Data For Graph

Jan 17, 2010

I am trying to create a graph for each store in my data sheet.

I have a data sheet with a list of stores that lists the quantity that was ordered by each store for the month of December. Not all stores placed ordered on the same dates.

What I would like to do is take the data from store line and create three columns that are: ....

View 11 Replies View Related

Transposing Cells Again... From Fixed

Sep 2, 2006

Attached is a sample of my challenges.

View 8 Replies View Related

Transposing Data For Import

Oct 25, 2006

I need to transpose some data for import into our accounts package, the budgets are produced in a fairly standard horizontal format with periods across the top & account codes vertically.

The import requires period data to be be transposed vertically

I have attached a worksheet with an example, is this possible in excel. the only way I have managed to accomplish this is via MS Access

View 8 Replies View Related

Transposing Relevant Data Between Sheets

Jan 27, 2014

I've taken part of our instrument service data and eventually want to trend the performance but have decided it will only useful to use data where I have 4 or more data points. However with so much data I want to automate the process rather than scrolling through the column. I assume this requires a lookup table of sorts but I don't know how to combine that and getting the other bits of relevant information (I.e. all dates and results).

GavInstrument Spec data.xlsx

View 1 Replies View Related

Transposing Data For Duplicate Cells?

May 8, 2014

I have a sheet of over 20,000 rows, each with 2 columns. Column A is numerical, Column B is name and address. There are duplicate entries in Column B, but Column A has unique entries.

I need to have 1 row per unique name and address with the numerical data from Column A relevant to that name and address either in one cell comma separated, or in cell C,D,E,F etc...

View 1 Replies View Related







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