Consolidate Rows Of Data Based On Single Column?

Aug 16, 2014

I have thousands and thousands of rows of data which look like the spreadsheet screen shot shown in this image:

ExcelConsolidateRaw.JPG

I want to consolidate them so that they look like the spreadsheet screen shot shown in this image:

ExcelConsolidateDesired.JPG

How to insert it into a module in the VBA editor.

View 3 Replies


ADVERTISEMENT

Consolidate Multiple Rows Of Data Into Single Row

Jul 28, 2006

I imagine my goal could be achieved via some scripting code, but, alas, I don't do vbs. Here's the situation:
I have a spreadsheet generated by another office which lists individuals' names and information about participation in various programs. Each line lists name, address, program title and amount. The next line may be the same name, address with a different program and amount. Each person may have 4-5 entries. I want to make single entries for each individual, with colums showing the programs and amounts.
Current:
ID Name Address Program Amount
1 Bob home A 25
1 Bob home B 37
2 Dave home A 22
2 Dave home B 10
2 Dave home C 21

Need:
ID Name Address Program A Program B Program C
1 Bob home 25 37 0
2 Dave home 22 10 21

Hopefully this makes it a bit more clear. The only way I know how to accomplish this is the "old fashioned" long hand approach of cut & paste. There are several thousand individuals, with (currently) tens of thousands of rows.

View 9 Replies View Related

Consolidate X Rows To Single Row

Mar 12, 2008

I have a report that has the option to download the data to an excel file, but am having trouble with the last portion of my macro to re-sort the data into something useful. Basically, I have all of my data in a single line, except for some "oddball" records that have an extra number in the row below (which I need). I did a quick macro record of what needs to happen with each one of those "oddbal" records, but I'm completely baffled as to how to get this to repeat every time the macro "sees" something in that second line. I've tried modifying the saved macro in the attached Excel file the following code (the If loop), but I'm getting syntax error that I cannot seem to resolve.

Sub Macro5()
Cells.Select
Selection. AutoFilter
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="="
If range "J" Selection.AutoFilter Field:=1, Criteria1:="<>"
Range.currentrow.offset(0,9).Select
Selection.Copy
Range.offset(-1,1).Select
ActiveSheet.Paste
End If
End Sub

View 3 Replies View Related

Consolidate All Data From All Worksheets Into A Single Worksheet?

Jan 27, 2014

how to consolidate all data from all worksheets into a single worksheet(master sheet)?

Untitled.png

In the attachment, data for worksheet 1 will be added to the masterlist and worksheet 2 will follow.

View 3 Replies View Related

Copy Rows Based On Criteria In Single Column

Jan 30, 2008

I have on sheet1 of my workbook a number of rows of data, from column A through Column G. The Data in column G either contains the text "Yes", or "No".

I need a macro that will look through each row in this sheet, and upon finding a "Yes" in the cell in the column G, will copy that entire row (columns A through G) into a new row in sheet2. Sheet2 currently contains data, so I'd like to move everything down by one row and paste this data at the top (row 6 is the first line of data on this sheet).

I'd then like to go back to sheet 1, and delete the row I've just copied. Then continue though the loop. The loop needs to stop when a blank row is discovered.

View 5 Replies View Related

To Consolidate Data From 2 Or More Sheets To A Single Sheet Within A Workbook

Feb 1, 2009

I have 2 sheets which validates data using vlookup.

Sheet1

Table 1ABResult1121232313

=VLOOKUP(A7,B:B,1,FALSE) is the formula in result1 column.
Sheet 2

Table 2DEResult21020102040203010#N/A

=VLOOKUP(F7,G:G,1,FALSE) is the formula in result2 column.

The basic idea of these vlookup is to check whether the data present in A or D column is present in B or E. If the data is there then it will be retrieved in "Result1" or "Result2" columns. If not then the result would return the value "#N/A".

What im trying to do is to copy the resultant data(from Result1, Result2) other than "#N/A" from individual sheets to a final consolidated sheet.

View 9 Replies View Related

Data From Rows And Column To One Single Line

Nov 12, 2009

I have to worksheets: Sheet1, Sheet2. In sheet 1, I have some data like this (in first col is 1, second col is a, third col is c etc. ):

1 a b c d
2 e f g h
.
.
.
.

I need in sheet 2 in range A1(only in this range one big text), something like this: a,c,e,g ........ ( row1-col2,row1-col4,row1-col2,row1-col4 ......) ( separated by ","). The number of rows from sheet 1 is variable. The dataf a,b,c,d,e,f,g,h ... is some random text.

View 4 Replies View Related

Data From Multiple Rows Into Single Column

Oct 19, 2007

I am trying to take data from multiple rows and columns (matrix) and reformat it all to fit in a single column.

It would be great if I could select the cells I want to reformat into the single column as the number of rows and columns containing the original data is not always the same (ie 20x20, 21x35, 56x200) etc...

View 9 Replies View Related

Copy Multiple Rows Data To Single Column

Oct 29, 2008

transposing and sorting data into multiple columns.

Column 1 for example will have the Parent's Name. Column 2 will have the Children.

If Mark has 3 children, X Y and Z

Jim has two children, A and B

then I want Column 1 to display Mark and Jims Name and column two should display all the children

Here is how I want the data:

Column1 Column 2

Mark X
Mark Y
Mark Z
Jim A
Jim B

Please see attachment.

View 3 Replies View Related

Consolidate Rows With Same Column Value

Jan 8, 2008

I'd like to consolidate rows with same value in one column to return total value of all the rows in another column. I am not very good with VBA so I was hoping if there is an easy non-vba way to do this. I've attached spreadsheet sample.

View 2 Replies View Related

Single Column With Multiple Rows Of Data - Compare Names

Apr 12, 2012

I have a single column with multiple rows of data like this: Afirst last, Bfirst last, Cfirst last (all in one cell) etc.

I want to type some names in one cell in the same format (Afirst last, Cfirst last, Bfirst last) but not order and then check if any of those names exist in the first column and count the results of matches.

So in this example I am looking to count Bfirst last and/or Cfirst last in every cell of column A. I need to use a formula.

View 2 Replies View Related

Convert Hourly Time Series Data From Rows To Single Column

Jan 8, 2014

I have A:1 - X365 filled with hourly energy prices for 2013. I need to convert these to a single column - A1:A8760. I have tried writing some code and some macros with no success.

If I were to do it manually 365 times, the macro would look like this:

Copy Row A1:X1
select sheet 2
Paste Special > Transpose (fills A1:A24)

repeat for rows 2-365

Tried using this from a previous post, but it takes A1:A24 then B1:B24 and so on and makes them a single column - so it doesn't work unfortunately.

Sub MakeColumn()
Dim rng As Range
Dim LastRowSrc As Long
Dim LastRowDst As Long

Set rng = Worksheets("Sheet1").Range("A1")

[Code] .....

View 3 Replies View Related

Consolidate Corresponding Values In Same Row Based On Column Value?

Jul 7, 2012

Code2
Code
Type1
Type2
Type3
Type4

00N100
0N400
10N100A

how this can be consolidated?

View 1 Replies View Related

Consolidate Rows And Sum Data

Mar 23, 2007

I would like code to consolidate weekly hours worked, on each project, for each person. I therefore wish to end up with 1 row per person, per date, showing their GRAND Total Hours worked in column P (across all projects, and across all tasks). So, in the example below, everybody's rows would stay as is, apart from Mike Jones's, which I would like to be consolidated into one row, showing a GRAND Total Hours worked of 16.

View 3 Replies View Related

Copy Column Data From Multiple Worksheets To Single Worksheet Based On Header Criteria

Oct 18, 2013

I have a workbook with many sheets of similar but not identical data. I need to extract columns from each sheet based on 5 header criteria and paste them to a single sheet. Each worksheet contains these 5 criteria.

I've been working with the VBA script I've pasted below. It's grabbing the 5 column criteria that I have in sheet 12, and comparing them to sheet 1 in the workbook, then copying them to sheet 12. This much is good, but I need the script to also return the data from the other worksheets as well. I've tried modifying the script based on other loop functions in other scripts I've found, but I'm not having any luck.

View 14 Replies View Related

Consolidate Multiple Spreadsheets (consolidate All The Data)

Oct 17, 2008

I have a workbook that has multiple tabs and need help trying to figure out how to consolidate all the data. I find myself spending hours doing this manually each day.

Here is what I have:

Workbook has tabs labeled....Wk1_Mon, Wk1_Tues, Wk1_Wed, Wk1_Thurs, Wk1_Friday, Wk1_Summary......and repeats all the tabs through Wk5....then I have a Month_Summary tab.

I have 25 users with 25 seperate workbooks each with individual information on each workbook.

I am trying to get a sum of all the data on the Month_Summary tab for each month for each user and as well as a sum of the Month_Summary tab for all 25 users.

The end result I am looking for is to get a Yearly Sum of all the Month_Summary Tabs for all 25 users as well as individual yearly summaries for each users.

I have one main Folder which contains 25 folders (one for each user). Under each user folder there is a seperate Workbook for each month.

View 2 Replies View Related

Consolidate Data Multiple Worksheets Based On Naming Convention

Feb 3, 2008

I have a workbook composed of many worksheets with varying names. Of the 40 or so worksheets, 25 of them contain data that I need to copy and consolidate into a master summary sheet within the same workbook. All of the sheets I need to grab data from have a worksheet name that ends in “(Data)”. All worksheets contain data that starts on the same row (row 8) but the number of rows of data will change daily. When I copy the data range on the individual sheets I do not want to copy the header row. I’ve tried various uses of the offset command with no luck to resize the selected range. I’ve also tried giving each range a named Dynamic Range and referring to this name in VBA code but that didn’t get me very far either. So the flow looks something like this:

1. Find all sheets with name ending in “(Data)” (i.e. “Project X (Data)”)
2.For each sheet found, find the data range and omit the first row of data.
3.Copy selected range.
4.Go to sheet “Master” and find the last row of data. Move down one row to the first empty row and paste copied range.
5.Go to next sheet and repeat.

View 9 Replies View Related

How To Consolidate One Month Individual Report In Single Sheet

Jul 7, 2012

Every month I need to consolidate the individual report in a single sheet for that I was doing with copy paste options but I need this to happen through macro or some other short way.

View 5 Replies View Related

Consolidate In Excel VBA For Multiple Variable Length Sheets In Single Workbook

Jun 30, 2014

my macro comes up with an error on the Consolidate line that says 'Cannot add duplicate source reference'. I have a workbook with a variable number of tabs and I want to consolidate-sum (not copy and paste) the data from the various sheets onto a summary sheet within the same workbook. I'm at the point where it all works fine until it hits Consolidate.

Option Explicit
Sub ConsolidateExport()
'
' ConsolidateExport Macro

[Code]....

View 1 Replies View Related

Paste Rows Based On Data In A Column

Jul 24, 2007

I've been using a macro that, among other things, will split a set of data into different sheets based on one column. For example, if I have Column A populated with numbers 1-10, each entry with a "1" in column A gets pasted into a sheet entitled "1", and so on. Some of the numbers I group together (for example, let's say I would group the 2s and 3s together).

I've been using the code below, but it seems to be very fickle. Half the time I run the macro, I get a "Run-time error 1004" and it points to the line "Sheets.Add. Name = WhtSht". Is there a different (easier) way to accomplish what I'm trying to do?

Dim rng As Range, StrtSht As String, WhtSht As String
StrtSht = ActiveSheet.Name
For Each rng In Range("A1:A" & Range("A65536").End(xlUp).Row)
WhtSht = rng.Value
If WhtSht = "21" Then WhtSht = "7"
If WhtSht = "34" Then WhtSht = "33"
If WhtSht = "36" Then WhtSht = "33"
If WhtSht = "37" Then WhtSht = "33"
If WhtSht = "56" Then WhtSht = "55"
If WhtSht = "57" Then WhtSht = "55"
If WhtSht = "76" Then WhtSht = "75"
If WhtSht = "97" Then WhtSht = "96"
If SheetExists(WhtSht) Then
Rows(rng.Row).Copy
Sheets(WhtSht).Select
Range("A" & Range("A65536").End(xlUp).Row + 1).PasteSpecial xlPasteAll
Sheets(StrtSht).Select
Else
Sheets.Add.Name = WhtSht
Sheets(StrtSht).Select
Rows(rng.Row).Copy
Sheets(WhtSht).Select
Range("A1").PasteSpecial xlPasteAll
Sheets(StrtSht).Select
End If
Next

View 2 Replies View Related

Pulling Rows Of Data Based On Criteria In One Column?

Dec 17, 2013

I've attached a workbook with a description of what I'm trying to do. I'm not sure if it can be done with formulas or if it will require VBA. I can move it to the VBA section if the latter terms out to be the case. it's not that I'm opposed to copying code, I just like to know how it works with enough depth that I can fix/modify it, and I can't do that with VBA).

View 6 Replies View Related

Delete Rows Based On Seperate Column Data

Nov 29, 2006

How can I delete an entire row based on seperate column data? Example: I want Excel to look at cell A2 and cell E2. If the values are the same I want Excel to delete row 2.

View 4 Replies View Related

Transpose Rows To Single Column

Feb 23, 2012

I'm trying to do something which I can't manage with traditional formulas and a macro might be required.

I have the following table:

Code:

Header1Header2Header3Header4Header5
1.00 6.00 11.0016.0021.00
2.00 7.00 12.0017.0022.00
3.00 8.00 13.0018.0023.00
4.00 9.00 14.0019.0024.00
5.00 10.0015.0020.0025.00

What I would need to do is take all column values and transpose is to rows, copying the header for every set, like:

ColumnA ColumnB
Header1 1.00
Header2 6.00
Header3 11.00
Header4 16.00
Header5 21.00

[Code] ...

View 8 Replies View Related

Single Column -> Multiple Rows

Mar 5, 2014

I have a single column of about 1500 points, and I need them to be separated into many rows of 20 numbers.

I have multiple issues:

1) The middle number of each row (10th and 11th) need to be repeated. So a transpose formula can not work all the way through the 20 numbers. Unless I transpose the first ten, then tranpose the second ten. Is there an easier way around this ?

2) The bigger issue is, I would like to write a formula that can manipulate the date to enter in the correct cell.

To illustrate I will use a set of ten numbers:

1
2
3
4
5
6
7
8
9
10
11
12

INTO
1
2
3
4

5
6
7
8

9
10
11
12

View 9 Replies View Related

VBA Delete Entire Rows Based On The Value Of Single Cell

Jun 10, 2009

I know it can delete entire rows based on the value of single cell, I just don't know how to do it. So what I need is a macro that will delete an entire row if the value in a particular column = 0.

More details: ....

View 9 Replies View Related

Transposing Multiple Rows To One Single Column

Apr 12, 2005

I frequently have to work with tables set up like this:

A1 A2 A3
B1 B2 B3
C1 C2 C3

All I would like to do is to transpose them into one single column:

A1
A2
A3

B1
B2
B3

C1
C2
C3

View 5 Replies View Related

Transposing Multiple Rows To Single Column

Feb 16, 2012

I want to transpose multiple rows to single column and I'm dealing with huge data.

For example, I am working with data like this

A1 A2 A3
B1 B2 B3
C1 C2 C3

and I have to transpose to

A1
A2
A3
B1
B2
B3
C1
C2
C3

I'm using following vb code:

Sub ToOneColumn()
Dim i As Long, k As Long, j As Integer
Application.ScreenUpdating = False
Columns(1).Insert

[Code] ........

The script terminate without completing the job and shows error as "runtime error '1004': application -defined or object defined error".

View 8 Replies View Related

Delete Certain Range Of Rows In Single Column?

Jun 10, 2014

I need to delete a certain range of Rows in a single column

View 3 Replies View Related

Converting Different Length Rows Into Single Column

Jul 29, 2014

I have a table in excel in which every line has as many values as the days of the month (e.g. 31 values first row, 28 the second..) and it goes from January 1948 to July 2014. So it ends up having around 800 rows.

I need to put all of those into a column, but it gets hard because the rows have different lengths. I have seen in this forum some solutions that apply well when the table is regular, but I'm stuck in trying to get a solution for when it's not. I have tried to record a macro using TRANSPOSE, but then I cannot change the cells into this formula in the editor in order to create a loop.

I also have to consider leap years.

View 4 Replies View Related

Split Single Column Into Multiple Columns And Rows

Aug 20, 2008

I have 300 rows worth of data that looks similar to this, all organized in one column:

John Q. Smith
Programmer
2111 NW 13th St
Anywhereville, USA, 55555
(555) 555-5555
Joe P. Snider
Organizer
5645 NW 45th St
Anywhereville, USA, 55555
(555) 555-5555
Patty Williams
Accountant
6454 NW 34th St
Anywhereville, USA, 55555
(555) 555-5555

As you can see it is consistent with the name, position, address line 1, address line 2, Phone number, for every single entry. All my names are already alphabetized so I don't have to worry about it. What I want to do is have the information for each entry translated into 5 separate columns so it looks like this.

John Q. Smith Programmer 2111 NW 13th St Anywhereville, USA, 55555 (555) 555-5555
Joe P. Small Organizer 5645 NW 45th St Anywhereville, USA, 55555 (555) 555-5555
Patty Williams Accountant 6454 NW 34th St Anywhereville, USA, 55555 (555) 555-5555

Supposing I started the sheet in the top left corner at A1, I was just going to have cell B1=A1 then Cell B2=A6 then just autofill down column B but it doesn't work. I have seen some people do something similar to what I want with VBA but I am convinced there has to be something simple in with an excel formula seeing as my information is already so organized and consistent.

View 4 Replies View Related







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