Merging Two Identical Spreadsheets
Aug 11, 2006
I have three large txt files. All three are the same number of columns but are of a different number of rows. (Each month the number of columns will increase but the 3 source files will still contain an equal number).
Therefore I need to open the first text file, select all data and paste it into my master file.
I then want to open the second txt file and paste all the data at the first empty row of my master file.
I will then open the third txt file and paste all the data at the first empty row of the master file.
Finally I will close the txt files.
I will then have several other amendments to make to the master data file.
So to my problem....
Opening the txt files is fine.
However I want to select all the data in the first txt file but excel gives me an error message. (On the line highlighted in my code). I remember there being a function in VBA that selects all data around a cell, can anyone remember how to do this?
My code so far is:
Workbooks.OpenText Filename:= _
"C:CUSTOMERPass 1.txt" _
, Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier _
:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:= _
False, Comma:=False, Space:=False, Other:=False, FieldInfo:= Array(Array _
(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8 _
, 1), Array(9, 1))
Cells.Select
Selection.Copy
ActiveWindow.WindowState = xlMinimized
Sheets("Data").Select
ActiveSheet.Paste
View 5 Replies
ADVERTISEMENT
Oct 24, 2008
What I am trying to do is take the data (all columns) in Spreadsheet 2 and put that data in Spreadsheet 1 with all the companies matching up, how do I do this, is this possible?
I tried using VLOOKUP but I don't know if I was doing it right and I don't even know if it's the right function to use.
In sheet 1, column A I have a list of about 30,000 companies
In sheet 2, column A I have a list of about 10,000 (pulled from sheet 1), I have other info associated with these companies in columns B and C.
Basically I want to take column A, B and C from sheet 2 and match them up with the same companies in sheet 1. So there will be 10,000 matches and 20,000 N/A's. This is how I set up the VLOOKUP but nothing happened.
View 8 Replies
View Related
Jul 14, 2013
I have a template and several spreadsheets based on this template, and when changes are made to the template they need to be manually merged into each spreadsheet, a very painstaking, time consuming, and error prone process. Changes are mostly added rows, data tables, and macro (coding) changes. Surely there must be a better way of doing this. There must be some way of automating at least part of this process, or so I would think. I know that changes to a workbook can be tracked, but I don't shows changes to code, and I don't know if it is true for templates as well (but I suspect that it is); at least this would show me what changes to the template had been made, but maybe not changes to the code, but this is only a small part of the problem.
View 1 Replies
View Related
Jul 18, 2012
I have two spreadsheets of part numbers, one with a full list of parts approx 3500 lines and another with the same part numbers (but only approx 1000 lines) but this file also contains sales history. columns shown below
PART NUMBER, PART DESCRIPTION, RETAIL, COST, UNIT OF ISSUE, CURRENT STOCK, YTD SALES, MTD SALES
What i want to do is merge the two files together so the 1000 parts i have sales history for correspond with the same 3500 lines on the other master spreadsheet, so i can then sort them in which ever order i need at the time.
View 5 Replies
View Related
Jan 23, 2014
I have a spreadsheet with names and phone numbers. I have another spreadsheet with similar- but not the same names and not in the same order- with email addresses.
I have pasted all info into one spreadsheet and alphabetised it- it looks a little like this now.... (joe bloggs being an example name)
joe bloggs telephone no
joe bloggs email
Is there a way i can easily merge these two rows keeping the name the same? Otherwise it will take FOREVER!!
View 5 Replies
View Related
Aug 15, 2014
I have a spreadsheet with only 80 rows in it and I need data from another spreadsheet with over 200 rows. One of these rows in each spreadsheet contains a matching field (Job #). I only want the 80 matching rows data from the over 200 row sheet.
Is there an easy way to combine these two. Even adding the 80 to the 200+ will be fine as I can just remove the blanks. I can't figure out a way to combine them and match them up.
View 2 Replies
View Related
Jul 31, 2014
I have two years of sales data for same and different product codes in different sheets for each year.
I want to merge both the sheets so that i have a consolidated view of both years data in one sheet.
The sheets have columns that look like the one described as under:
Product code Month 1 m2 m3 m4 m5 m6 m7 m9 m10 m11 m12
View 2 Replies
View Related
May 2, 2014
I have two Spreadsheets on Excel 2003, one provided by a service supplier (i), and one from my own system (ii).
I need a macro attached to spreadsheet ii that looks for data matches between the F column of my spreadsheet, and the C column of the suppliers. Where data matches (i.e. if cell C42 in spreadsheet ii is the same as cell F23 in spreadsheet i) it transfers the contents of the A column of spreadhseet i and places it in the corresponding cell in the C column of spreadsheet ii.
Example 1 : In spreadsheet i cell C20=BN213YD. In spreadhseet ii cell F55=BN213YD. Therefore, the macro takes the contents of cell A20 in spreadsheet i and places it in cell C55 of spreadheet ii
Example 2 : In spreadsheet i Cell C75 = TN142XS. In spreadsheet ii this data is not found. The macro therefore takes no further action.
Basically, the suppliers spreadsheet has less information per row, but more entries overall. My spreadsheet is lacking a lot of suppliers references, but has more comprehensive information elsewhere. Until now i have been doing a manual search of the postcodes between the spreadsheets and rectifying them manually, but this is taking longer and longer as the spreadsheets grow.
View 1 Replies
View Related
Jun 15, 2013
In the attached Excel file, the data has been place from d2 to dyo2.
For example, value "2607" is placed from cells va2 to wk2.
I need to merge cells from va2 to wk2.
I can't use horizontal alignment - center across selection because my boss wants it to merge only.
View 5 Replies
View Related
Feb 20, 2008
I have a list of data which doesnot match with my database and am hence failing to understand what to do.
2 sheets attached.
Was trying to find the employee ids of the advisors from the database.
View 9 Replies
View Related
Aug 19, 2014
I would like to open 3 excel files (with identical names) from 3 different mapped drives eg M,N and O. How can I use Excel VBA to rename these 3 files based on their original locations and save them in a folder in the C drive eg M_Filename,N_Filename and O_Filename.
View 3 Replies
View Related
May 29, 2007
I am retrieving data from 2 different sources in a database.
i am having problem with identical data being classed as different, see below.
******** ******************** ************************************************************************>Microsoft Excel - Book1___Running: 11.0 : OS = Windows XP (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutA3=
ABCD11.9.2.1**Access*Security***21.9.2.1**Access*Security***3FALSE***Sheet1*
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.
These two cell are identical (have checked theer are no random spaces) however the formula is saying that they are not equal. They are also in identical formats.
View 9 Replies
View Related
Jan 15, 2009
I need a formula to sum column C if data in column A and Column B are found anywhere else in the list. For Example
A............B.......C
0103019..C.......5
0103019..1.......2
0103019..14.....1
0103019..C......4
Column D would show
9
2
1
9
View 9 Replies
View Related
Apr 20, 2006
=If(ISNA(VLOOKUP(B2, 'TableB'!$Y$2:$Y$100,1,FALSE)) , "",Column A in tableB)
I want to search tru all column B in table A. If i find an identical value in table B i want the field in table A to show the corresponding field in Column A in table B.
Also if there is 2 occurrences of column B in table B, i want the field in table A to show both values.
View 9 Replies
View Related
Jun 7, 2007
i have got two tables each on a different sheet. The column headings are not the same but in both tables column A contain names. Users can enter names in column A in the first table, and these should be copied to the second table. However, users can insert rows in the first table which should automatically be copied to the second table to ensure the tables haven an identical number of rows (names)
View 2 Replies
View Related
Jun 10, 2007
This "If" wont work, does anyone have an idea why? I have try hard coded, with "" and without, i tried to assgind the field value to another double patameter and still nothing. This is my last try where i converted it to double type
View 7 Replies
View Related
Aug 18, 2014
I need to extract the text located before last specified character () From C:PicturesPersonalChristmasDSC_00001.jpg ----> C:PicturesPersonalChristmas
I found a nice formula in another thread but that one returns the text located after the last "". The formula is =RIGHT(A1,LEN(A1)-FIND("@",SUBSTITUTE(A1,"","@",LEN(A1)-LEN(SUBSTITUTE(A1,"","")))))
View 2 Replies
View Related
Jun 10, 2008
I have a list of transactions on accounts that have the account name multiple times. I want a count of just those account names but without the copies for the different transactions. I have like 5 entries (transactions) on say Bob Smith's Towing I need it to combine all five entries into one or delete all but one so I have a true count of how many accounts I have.
View 14 Replies
View Related
Aug 20, 2009
I'm working on two almost identical lists but because of their nature, some rows are repeated on one of the sheets and so on. I need help matching some cells onto the other sheet. I tried the VLOOKUP formula but it doesn't work since some rows are repeated... I need the match to link especifically a Name with it's correspondent Value, regardless of the position of the name in either of the sheets and whether it is repeated or not.
View 7 Replies
View Related
Feb 18, 2009
Hi guys, I am looking for a macro to do the following:
Go down a column and identify all accounts that are identical, then add up the values that are 5 columns to the right of each account and paste them on another sheet along with the account code (there are 12 values for each account to be added with the other identical accounts).
I've attached a spreadsheet, because I understnad this might be kind of confusing. In essence:
1. Go down column C
2. Look for accounts that are identical
3. Add up the values for each account in columns G:R
4. Copy and paste the added values to another sheet along with columns C:F for each account to identify it.
View 9 Replies
View Related
Dec 1, 2009
I need to find ALL occurrences of a date on a worksheet, but could not find a macro on our forum.
I found this macro on the web.
View 6 Replies
View Related
Nov 9, 2008
I have a database with 6 columns in play (there are actually other columns but they are not relevant). I'll call the columns A through F. I would like to be able to match certain counterpart rows together, do a sort placing the counterpart rows adjacent to one another, and then count how many pairs I have. (Some rows will have no counterparts.)
Here is a micro-illustration of the database:
______A______B______C______D________E_____F
R1___01-03___54____959____nsneakr___24____yes
R2___01-04___67____454____adidaht____53____yes
R3___01-10___42____344____calb3wd___11____no
R4___01-19___67____454____adidaht____53____no
R5___01-25___54____959____nsneakr___24____yes
R6___02-02___54____959____nsneakr___24____no
R7___02-14___54____959____nsneakr___24____no
I basically need to devise a formula or script that pairs together two rows that fit the following criteria:
1) The rows are identical in Columns B, C, D, and E.
2) The rows are not identical in Column F (i.e., one half of the pair should have "yes" and the other half should have "no")
3) The rows are as close together as possible according to the date sequence in Column A. For example, Row 1 should pair with Row 6, and Row 5 should pair with Row 7. Row 1 should not pair with Row 7, and Row 5 should not pair with Row 6. **This criterion seems tricky because R5 and R6 would technically fit the requirement for pairing, were it not for the fact that R1 comes earlier in the sequence.**
View 2 Replies
View Related
Mar 8, 2012
I want to delete some rows that are identical. Aside from creating a macros to do this, is there a way to find a row with a specific criteria and delete it if value returns TRUE?
View 1 Replies
View Related
Jan 21, 2013
I have two identical drop down lists (months i.e. Jan, Feb, Mar ...) in two different sheets but in the same workbook. Is there any way where the user changes the month in sheet 1 & the other drop down list in sheet 2 changes automatically to the same month selected by the user in the sheet 1 or vice-versa?
View 1 Replies
View Related
Aug 20, 2013
I have successfully used dynamic lists that remove items that have been selected from a dropdown menu already, however, is there any way dynamic lists can be set up to handle multiple identical items and then if there are say 3 identical items in the dynamic list, once 1 has been select only 2 remain in the list...?
View 1 Replies
View Related
Dec 26, 2013
On the top, you'll see that even though there is an equation in cell "K" and merged cells "O and P" that the cell is reflecting a blank box (how I want it to look). Within the same workbook, a different worksheet that has the same exact cell settings is showing "$0.00" in those cells. I can't figure out how to get it to be blank! Yes, I tried the copy/paste from the cell that I like to the other worksheet but it doesn't work. Again - all of the cell settings are the same.
View 3 Replies
View Related
Jun 13, 2007
I am creating one big workbook with several different worksheets. I need to make the first two columns of every worksheet identical.
I would like to make it so that when an item is changed in any cell in any column on any worksheet, the other worksheets automatically change to become identical.
View 9 Replies
View Related
Aug 22, 2007
I am trying to join 2 tables which have identical columns. The columns are:
A B C D E F
Date : Name : ID : Violation : Date Sent : Comments
Table 1 has information in columns A-E, Column F is blank
Table 2 has information in columns A-F.
I want to be able to check the information in Columns A-E in both tables and add the information in Column F from Table 2 to Table 1 where Columns A-E are an exact match.
View 9 Replies
View Related
Aug 10, 2007
In each row of my data set, columns A thru E contain different three-digit numbers, in ascending order (e.g. 012 312 344 798 880). No number is repeated more than once in a single row, and no two rows contain the same set of five numbers. Column F contains a value (these are what I'd like to sum).
The variables I want to create a formula with are each three-digit numbers, call them X and Y. I want to find the pairs of rows where one row contains X in one of the first five columns, and the other row contains Y and the same other four values as were contained in the four non-X cells in the X-row (note that X and Y may or may not be in the same column, since each row is in ascending order). If X=344 and Y=955, an example of a match would be one row with 012 312 344 798 880 and another row with 012 312 798 880 955. For each X and Y combo there could be many such matching pairs of rows (with different sets of the other four values). I'd like to sum all the values in the X rows of such pairs (and then I'd do the same with a different formula for the Y rows).............
View 3 Replies
View Related
Dec 2, 2013
I have a conditional format which uses this format MAX($N$84:$N$94) to colour the cell containing the number but I now wish to amend this formula so that if an identical number also appears further down in the column only the first of the cells containing the identical number(s) will be coloured but none of the others,
View 4 Replies
View Related