Compiling Partially Matching Data Into Matching Rows With Macro

Jan 20, 2013

My task is to combine two large databases into one spreadsheet by extending the number of columns. The data from each database is 90% matching based on an identification number, however occasionally there are additional rows or unmatched identification numbers that need to be kept for analysis.

When this happens, there needs to be a blank row inserted to represent the missing data in the rest of the corresponding row.

I am having trouble finding a quick way to do this because I have approximately 12,000 rows (and columns up to DV when combined).

for example:

p1
data
data
data
data
p2
data
data
data
data

[Code] .....

needs to become:

p1
data
data
data
data

[Code] .....

I am guessing I will need a macro of sorts, So far I have made one column that tell me if the ID's are matching or not (1 or 0) and if they are not matching (0) I manually insert the rest of the row that is missing or make space for the duplicate data (which needs to remain).

View 5 Replies


ADVERTISEMENT

Matching Two Tables - Copying Data For Matching Value?

Feb 27, 2014

I have two tables, Table1 one has only customer codes in it, and I have Table2 with plenty of customer codes and those customer name, surname, age, location...

And I want to match and copy each of those customer codes in Table 1 all the information which is on Table2

Table 1:
50025
50026
50086

Table 2: Considering that name, age and location is each in separate cell

50025JohnSecond25Location 1
60085EmilyThird 20Location 2
45454Wilhelm Fourth35Location 3
10000RoseFifth 60Location 4
50086JohnySixth 45Location 5
65501JacobSeventh18Location 6
50026Jackie Eighth22Location 7

And the outcame should be that it finds the value from Table1 in Table2 and copy's information in Table 1 like this:

50025 JohnSecond25Location 1
50026 Jackie Eighth22Location 7
50086 Johny Sixth 45Location 5

View 2 Replies View Related

Copy Matching And Non Matching Data Into New Worksheet

Feb 20, 2014

I have two worksheet "ABX" and "ACX" from which I want to find the matching data for specific columns B, D and E only.

Matching data will be in sheet "Match" and vice versa.

Data are present dynamically.

View 1 Replies View Related

Copy Rows Of Matching Data

Jul 10, 2006

I'm trying to use a vlookup or some formulae in sheet 3 that looks at AGDP and matchs column A with a number in statement file worksheet column b. If they match not all of them will then the row is cut and paste into Sheet 3.

View 9 Replies View Related

Matching Then Aligning Data Across Rows And Down Columns

Dec 22, 2008

I have what I believe to be a simple problem, but for the life of me, i can't seem to figure it out.

I have a list companies in column A that have a corresponding revenue number in column B.

In column C, I have ANOTHER list of companies and their corresponding revenue number in column D.

Example:...

View 14 Replies View Related

Bank Reconciliation - Many To One Matching And Partial Cell Matching

Nov 19, 2009

programming 2 macros in a bank reconciliation sheet I am trying to create.

Basically the data consists of two sets: the ledger side and bank side. Both sides consists of multiple columns that include date, description and amount.

The following two situations can occur and which need to be covered with a macro.

Many to one matching
When we make payments to say 100 different suppliers at once, the ledger side will show 100 lines with the different amounts. However on the bank side it will only show one line with a total amount for the transaction. As the description on the ledger side is the same for all transactions done at the same time, it should be possible to have a macro add these lines and compare the total with entries on the bank side. Once a matching amount has been found, the macro should place an ‘x’ next to all entries on the ledger and bank side, in order to show that these transactions have been reconciled.

Partial cell matching
In this case we are only dealing with one line on both the ledger and bank side. The issue is that the description does not always perfectly match with one another. The ledger side might say ‘Brown Corp.’ and the bank side might say ‘Brown Corporation’. I want to come up with a macro that can recognize this partial match and still reconcile the lines by placing a ‘x’ to both the ledger and bank entry. The match however should be done with a combination of description, date and amount as several different bookings might be done for the same supplier in the same month.

View 12 Replies View Related

Matching 2 Rows In 2 Different Sheets

Apr 28, 2009

I have 2 sheets with lots of data in them. On the first sheet in the A column i have data that looks like this: 01234567 On the second sheet in the D column i have data that looks like this: 1234567 It's basically the same data except without the 0 in front. The first sheet has like 60k rows and the second sheet has around 18k rows. I need to find out what data from the second sheet is in the first one. I'm attaching an example.

View 2 Replies View Related

Looking Up And Matching Rows To Columns?

Sep 17, 2013

I have a document where there are hundreds of rows and columns. The rows contain lines of data, while the columns are topics. Each row needs to be traced to an appropriate column. Once traced, I simply check off the appropriate cell with an X. I have to make sure that each row has at least one "X".

I have attached a sample file. look at cell B8. The statement in this row reads "Issue Placard information and registration". Now, I already know what column this statement belongs to (column CT).... but I don't want to scroll over hundreds of columns to that particular column, or have to freeze any panes, to locate that cell and mark it off. I have been doing this manually and it is incredibly tedious and time-consuming. Is there a way where I can locate the appropriate cell and go to it without having to scroll? When I'm scrolling I have to not only scroll, but I have to read the rows and columns again to make sure they indeed match. I want to be able to locate the right cell instantaneously and just enter an X value.

View 1 Replies View Related

Looking Up And Matching Rows To Columns

Nov 1, 2013

I have a document where there are hundreds of rows and columns. The rows contain lines of data, while the columns are topics. Each row needs to be traced to an appropriate column. Once traced, I simply check off the appropriate cell with an X. I have to make sure that each row has at least one "X".

I have attached a sample file. look at cell B8. The statement in this row reads "Issue Placard information and registration". Now, I already know what column this statement belongs to (column CT).... but I don't want to scroll over hundreds of columns to that particular column, or have to freeze any panes, to locate that cell and mark it off. I have been doing this manually and it is incredibly tedious and time-consuming. Is there a way where I can locate the appropriate cell and go to it without having to scroll? When I'm scrolling I have to not only scroll, but I have to read the rows and columns again to make sure they indeed match. I want to be able to locate the right cell instantaneously and just enter an X value.

View 1 Replies View Related

Delete Matching Rows

Jun 17, 2009

Situation: I would like to compare the information between two worksheets and delete the rows that contain the same data in multiple columns, on a row by row comparison.

IE: I have two worksheets, each have identical row headers, with 5 columns each.

Company Load Date Load Time Load Description Amount ?Report?
Store#44 5/14/2009 11:55:41 AM MMBAYO $40.00 WS1
Store#44 5/14/2009 02:34:21 AM SLATOUR $20.00 WS1
Store#45 5/14/2009 01:55:41 AM GCHANDLER $100.00 WS1
Store#46 5/14/2009 11:55:41 AM MMBAYO $40.00 WS1

If column A(Company), B(Load Date), and E(Amount) for record 35 in worksheet one, match the same columns for a record in worksheet two, both records are deleted/highlighted/marked with an x in an additional column/anything.

Alternately, I can combine the data in both worksheets into one large worksheet, if that would make the solution easier. And or adding a column that idenifies which record came from which report.

Basically I have two similar reports; each contain a few rows of transactions that the other does not, I need to separate the matching transactions from the unique transactions, in order to balance the two.

I have tried using the Remove Duplicates function but it saves one of the matching records (they should add an opiton to delete matching records aswell keeping only truly unique records), I dont understand how to work Conditional Formatting to get it to do what I want, I dont know macros, or vlookups.

View 9 Replies View Related

Consolidate Matching Rows And Delete Duplicate Rows?

Feb 20, 2008

I am working with timesheet data (name, project code, task code, date, hours etc...) in one spreadsheet and rate card data (name, role, day rate etc...) in another.

My task is to pull together some of the information in each of these two source spreadsheets and compile a report. This I have done no problem. However, where a person works on a particular project and task on the same day and records multiple entries (which could be negative) I need to consolidate the hours in all these matching rows and have just one row reflect the total hours worked and delete the other duplicate rows.

So an example would be:

Project | Task | Name | Role | Date | Hours

123456 | 1.001 | Paul Jones | Project Manager | 20/02/2008 | 2.5
123456 | 1.001 | Paul Jones | Project Manager | 20/02/2008 | -2.5
123456 | 1.001 | Paul Jones | Project Manager | 20/02/2008 | 3.5

[Code]....

My problem is I don't think I have approached this the right way but am unsure of where to go with it. The code as is does sort of work but I still get some duplicate and zero lines in my results.

View 4 Replies View Related

Copy Rows To Workbook Into Rows Matching Date

Dec 13, 2006

I have 2 workbooks.

The first one (Top Ten Auto Generator.xls) ( Sheet is Summary) has 1 row (13) with 4 cells that have data. A13 with date (today formula), B13, D13, and E13 are numbers. The cell range will be the same each time the data is copied (the workbook has a marco to generate the numbers each day already).

The date doesn't need to be copied, just the other 3 cells data (in the same order) using paste special.

The workbook that needs the cell data is a report ( Dashboard.xls) that has lots of different departments each using 3 columns for their specific data. The left most column A is the date listing to match.

The column Range for my department on that "Raw Data" sheet is "H", "I", & "J" where the "H" would get the data in "B13", "I" would get "D13", "J" would get "E13" for the date that matches the other workbook.

So the way it would work, is that once the vba is run the 3 cells from the auto generator are copied, then the vba opens the dashboard.xls and looks for the date in column A which matches the other workbooks A13 date value, and then the cells are pasted into that row, but in column H, I, & J.

Here's sort of some code that I put together to see if that would be easier to understand. I'm new at doing the vba so I don't have better code.

Private Sub CommandButtonpaste2dash_Click()

'get our data from generator

Windows("Top Ten Auto Generator.xls").Activate
Sheets("Summary").Select
Range("B13,D13,E13").Select
Range("E13").Activate
Selection.Copy
Workbooks.Open "Dashboard.xls"
Sheets("Raw Data").Activate

'look for the date in column A which matches A13 in the Auto generator
Some Code For finding the right date

'once found, paste special to the same row, but in column H (the 3 cells should paste together ok)
some code For pasting into H In the same row As the found date

Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats
ActiveWorkbook.Save
MsgBox "Done!!!"
End Sub

View 9 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

Consolidate Matching Rows And Delete Duplicate Rows

Feb 20, 2008

I am working with timesheet data (name, project code, task code, date, hours etc...) in one spreadsheet and rate card data (name, role, day rate etc...) in another. My task is to pull together some of the information in each of these two source spreadsheets and compile a report. This I have done no problem. However, where a person works on a particular project and task on the same day and records multiple entries (which could be negative) I need to consolidate the hours in all these matching rows and have just one row reflect the total hours worked and delete the other duplicate rows. So an example would be:

Project | Task | Name | Role | Date | Hours

123456 | 1.001 | Paul Jones | Project Manager | 20/02/2008 | 2.5
123456 | 1.001 | Paul Jones | Project Manager | 20/02/2008 | -2.5
123456 | 1.001 | Paul Jones | Project Manager | 20/02/2008 | 3.5
123456 | 1.001 | Jo Brown | Developer | 20/02/2008 | 7.5
123456 | 1.001 | Jo Brown | Developer | 20/02/2008 | -7.5
123456 | 1.001 | Sam Smith | Architect | 20/02/2008 | 7.5

Should be processed and come out like this:.......................

View 2 Replies View Related

Align Matching Row Values Column And Remove Non-matching Row Values?

Jan 27, 2014

see attachment below for easier comprehension of what I need to be done. Note that I have around 20 subjects (2 in example) and about 15000 values per subject (5 per subject shown) Basically, I want matching rows to be aligned (see grey) and non-matching rows to be deleted, throughout the 20 or so subjects.

Exemple.xlsx

View 6 Replies View Related

Matching Cell Formats Based On Matching Cell Values

Jan 28, 2010

I have a cell (A1) that contains text.
That text will match a single value in a reference list (i.e. range of cells e.g. Z1:Z26).
When the match occurs (e.g. A1 = Z16), I want the format of the reference cell (fill color, text color) to apply to the cell of interest (A1).
The reference cells are manually formatted.

I know that I could create a long list of conditional format formulas instead of using the reference, but it seems that there must be some way to tell excel: if the cell value contents are equivalent, the formatting should be as well.

View 9 Replies View Related

Matching Rows And Replacing Numbers Associated With Them

Jan 5, 2010

I have 4 Columns. Column A has a master list of inventory numbers(about 3000 of them). Column B has dollar figures associated with them. Column C has some inventory numbers in it(800 of them), all of which are also in the master list in Column A. Column D has dollar figures that are associated with the inventory numbers in Column C.

My question is how can I make it so that if an inventory number in Column C equals one in Column A that the dollar figure associated with the inventory number in Column C gets put into its own column on the same row as the inventory number it was equal to in Column A.

I've tried basic IF functions and I can't get it to work because the inventory numbers aren't lined up on the same row. So one may be on row 300 but the other maybe located in row 12. Maybe if a double sort was possible or if someone knows how to make the row in the IF statement a variable.

View 2 Replies View Related

Sum And Merge Matching Rows Into Single Row?

Jan 17, 2014

I have a CSV file that varies in length. The request is to have a macro to import the CSV file, sort it by account number (COL A) and for every row that has a like number in COL A, sum the numeric values in COL F. I have considered a pivot table however we then have to take the SUMMED records and export then in CSV.

how to SUM based on COL A? The rest of the information in each like row is duplicated.

View 1 Replies View Related

Copy Matching Rows From 2 Workbooks

Aug 8, 2006

I have 2 work books A and B. I want to be able to copy the entire rows out of WB A, which contain the same data as one of colums in WB B

e.g

WB A

Bob Smith | 3 Smith Lane | 0204587512 | bob.smith@emailaddress.com |

Tom Brown | 3 Brown Lane | 020241445 | tom.brown@emailaddress.com |

WB B

| bob.smith@emailaddress.com |

Would give me WB C

Bob Smith | 3 Smith Lane | 0204587512 | bob.smith@emailaddress.com |

Any way of doing this?? I know that i could use ' find' then copy the data, except i have around 300 records...

View 3 Replies View Related

Highlight Non-Matching Rows In 2 Columns

Nov 21, 2006

I need to run a macro that compares two columns and Highlights the ineuality rows in both columns

View 9 Replies View Related

Copy Rows Matching Criteria

Jan 3, 2007

setup a vba code to find values which were separated by a certain value, thus there would be pairs of numbers sought after. What occured was that the first value is bolded, followed by the second not bolded, this pair would be separated by 75. Now I want to apply the same code, but instead of copying just the two cells which were separated to someone on the current sheet, I would like it to copy the entire row (as there is more data associated with it now) with the same bold/not bolded pairing to a new sheet, called "Numbers". I would imgine it be straight forward, yet I am very new to this and still tinkering.

Heres the ....

View 9 Replies View Related

Delete Rows Not Matching Criteria

May 11, 2007

I have been using the code found here

Sub DeleteRowsFastest()
Dim rTable As Range
Dim lCol As Long
Dim vCriteria

On Error Resume Next
'Determine the table range
With Selection
If .Cells.Count > 1 Then
Set rTable = Selection
Else.............................

to delete rows that match the given criteria. I am now wanting to do the opposite, keep the rows matching my given criteria and delete all others.

View 3 Replies View Related

Extract Matching Rows From 2 Files

Jun 2, 2007

I had a VBA excel question. I have 2 excel files. Each file has a column on product SKUs. What I need is a VBA function that compares the 2 key columns and extracts the matching SKU and saves them in a 3rd excel file. That is the 3 file should contain only the SKUs that are in both of the 2 files.

View 9 Replies View Related

Remove Rows With Non Matching Numbers

Aug 17, 2007

I have a large file with many item numbers that run down column B. Here is how it is set up. It has a header that says store one. Under store one it lists all item numbers in that store. Then under that it says store 2 and list all item numbers in that store and so on. There are a total of 90 stores with an average of 40 items per store. I have certain item numbers that I want to see but I want to delete all other numbers. Is there a way I can tell it to Delete all items except for the following, and then list the numbers I want it to keep?

View 3 Replies View Related

Copy Non Matching Rows To Worksheet

Sep 15, 2007

I have used marcos to create two worksheets and need to compare each row of the first three columns in each worksheet to find any rows which non-matching data. I am comparing retrieved data (Worksheet1) against a master list (Worksheet2) to ensure the retrieved data was entered correctly. The three columns of data include Manufacturer, Lot number and Date.

The row in which the matches will occur is random. The three values from the retrieved data only have to find a match somewhere in the master list. I can place both the retrieved data and the master list side-by-side on the same worksheet if that would make things more efficient for running the comparison.

The non-matching rows, if found, will be copied over to another worksheet along with its corresponding row in columns "D" and "E" found in Worksheet1. The additional data alerts me to the location where the data was entered incorrectly. The master list does not have any location data in it.

View 5 Replies View Related

Copy Matching Rows To New Sheet

Jan 17, 2008

I'm trying to eliminate any .select or .activate from my code to speed things up and reduce screen flicker. At the moment, I have a sheet created at the click of a button. Basically for every date exclusive of weekends, there are 4 entries, for each date there are the following entries AM Metro, PM Metro, AM Regional, PM Regional. The user wants to be able to change the date range in the "overview" sheet and when there is data already in the other columns for these matching rows, have the input sheet update with old (copied??) info, if no previous data then add all 4 rows and sort... if previous date not in date range then delete entire row.

View 4 Replies View Related

Sum Matching Rows From Multiple Sheets

Jun 14, 2008

I'm working with 2 sheets. Both have the same headings, A1 is CustomerCode, C1 is JAN, D1 is FEB and so on. The CustomerCode column doesn't match exactly between the 2 sheets, because some of the customers from Sheet1 aren't listed on Sheet2. I need a formula to put on Sheet 3 that will Sum the values in JAN, FEB, etc from the first 2 sheets for matching customers, and also bring over the totals from the customers on Sheet 1 that don't have a match on Sheet 2.

I have attached an example of how the finished product would look in my case. But also, here's this:

Sheet1 Charges

CustomerCode JAN FEB
ABC 30 25
AEF 20 15
BBB 50 30
CED 15 20

Sheet2 Misc Charges

CustomerCode JANFEB
ABC 510
BBB 3 8
CED 2 4

Need Sheet3 To look Like this:

Sheet3 Total Charges

CustomerCode JANFEB
ABC 3535
AEF 2015
BBB 5338
CED 1724

New customers are added often, so I have a SQL Query that I can put in column A of sheet3 that will pull the same CustomerCode list as sheet1, so getting the names to sheet3 shouldn't be an issue.

View 3 Replies View Related

Combine Rows From Matching Certain Criteria In Two Tables

Jun 9, 2013

I have a spreadsheet that contains two input tables: Parallel and Perpendicular. Next, the user can select a group which a certain entry belongs to. Now what I want is a "summary" of these entries in a table that has no blank rows and combines both Parallel and Perpendicular entries by the Group. Please note that there is no fixed number of inputs for any one group i-e the solution has to be dynamic.The groups are numbered from 1 to 6 and number of groups is fixed i-e 6.

A sample file illustrating the inputs and required output is attached.

I also posted this on: [URL] ....

Sample_file_summary.xlsx

View 2 Replies View Related

Find Average Of Rows That Have Matching Arguments (7)

Apr 5, 2009

Need to find average (see attached file) of certain rows of column C that correspond to letters on column B that match any letter on column A. Basically if column B has the same text as in one of the cells in column A then number across in column C should be used to calculate the average. In column D I have entered(manually) all values that satisfy the above condition and obviously the average should be 1 if formula is correct.

I have tried to use AverageIF function but not able to do it as there are many conditions. Another thing to consider is that conditions change (column A content) so I need to use cells that have information rather then actual text in it.

View 5 Replies View Related

Count Rows Matching Multiple Conditions

Nov 17, 2009

I want to count all instances if the following conditions are true. In quotations, are the names that I am using for column ranges. Here are my conditions, I want to count the rows that have the following conditions.

When "dates" or J2:J25 is less than or equal to today's date
AND
"HTeam" or W2:W25 is equal to Civil
AND
"Percent" or K2:K25 is equal to 100

View 4 Replies View Related







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