Merge two files based on one column

Hi, I have the following two files

File 1: 
Column1, Column2, Column3, Column4, Column5
SSN1, First1, Last1, Street1, Zip1
SSN2, First2, Last2, Street2, Zip2
SSN3, First3, Last3, Street3, Zip3

File 2:
Column1, Column2, Column3, Column4
SSN1, City1, State1, Country1
SSN2, City2, State2, Country2
SSN3, City3, State3, Country3

I need to merge the two files based on Column1. How do I do that? Vlookup 
only lets me add one column in file1. I want to merge both files based on SSN.
0
Utf
1/3/2010 6:53:01 AM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
1218 Views

Similar Articles

[PageSpeed] 6

You need to use 4 vlookups.  One for each new column with the column
number different in each Vlookup.


-- 
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=166517

[url="http://www.thecodecage.com"]Microsoft Office Help[/url]

0
joel
1/3/2010 12:06:11 PM
Is there anyway to do this without using VLookup?

"joel" wrote:

> 
> You need to use 4 vlookups.  One for each new column with the column
> number different in each Vlookup.
> 
> 
> -- 
> joel
> ------------------------------------------------------------------------
> joel's Profile: 229
> View this thread: http://www.thecodecage.com/forumz/showthread.php?t=166517
> 
> [url="http://www.thecodecage.com"]Microsoft Office Help[/url]
> 
> .
> 
0
Utf
1/3/2010 6:14:02 PM
Yes you can do what you want with a macro.  Your posting was in a
miscellaneous goup where people don't normally want a macro solution. 
Can you answer a few questions so I can write the macro.

1) What extensions are your source files. Are they CSV or XLS?

2) What type file do you want the results to appear? (xls or CSV).

3) Where do you want the results put.  In a 3rd file or in one of the
two source files?

4) Can you specify the Sheet names where the data is located (from/to)
if you are using XLS file(s).

5) Where do you want the macro put.  In one of the source files, the
Destination file, or in a file where there is no data.  The macro must
be in a XLS file since CSV files are just text files and cannot contain
a macro.

I'll have the macro open a dialog box that will allow you to select the
source and or destination files where the results are stored.


-- 
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=166517

[url="http://www.thecodecage.com"]Microsoft Office Help[/url]

0
joel
1/3/2010 9:24:32 PM
Reply:

Similar Artilces:

how do I open files from other versions in Publisher 98?
I have Publisher 98, and am trying to open a Publisher file emailed to me from someone else. I don't know what version they have, but I would guess it's from Windows ME, because I know they don't have XP. And when I try to open it in my Publisher, it says, "Publisher cannot open files from a different version". Is there any update or anything I can download to fix this, or do I have to buy a different version, or is there a way the other person could save their file so that I could open it? Thanks very much. A small child turns to Ed, and exclaims: "Look! Look...

How to Automate Word mail merge from AC2007?
I'm trying to do a Word mail merge from Access 2007 -- populating a Word 2007 template with data from recordsets built off queries. The problem I'm having is the current code creates each letter as a separate Word doc. I need one big Word doc with page breaks between each letter. The code uses nested loops - the first recordset rst has the list of people, the second rstBkm has bookmark data. Question: How to get this code to create one Word doc with page breaks between letters rather than each letter in a separate Word Doc? Thanks in advance. [abbreviated code below] ...

Use Copied Outlook PST file as default...How?
If I copy a PST file on my PC, how can I configure my Laptop Outlook to use that copied file as its default. Is it possible to copy new Defined Views in Contacts from one computer to another. Dmahanay <anonymous@discussions.microsoft.com> wrote: > If I copy a PST file on my PC, how can I configure my > Laptop Outlook to use that copied file as its default. Outlook version? > Is it possible to copy new Defined Views in Contacts from > one computer to another. I think views are registry items and not kept in the PST. -- Brian Tillman My outlook version is 2002. >--...

Conditional Formula based on previous date + 30
I have a spread sheet that caluclates when proposals expire. Date Sent Follow Up date January 13, 2010 February 12, 2010 What I am looking for is for the Follow up date to turn RED when the date is expired (over the date listed). Just use CF with a formula of =B2>TODAY() -- HTH Bob "Chris" <Chris@discussions.microsoft.com> wrote in message news:66DE65F1-F041-434C-86A7-B13635C6914F@microsoft.com... >I have a spread sheet that calu...

Add the same field twice to a pivot table but filter one of them?
In my datasheet, I have a "cost" column and a "date" column so each cost has an associated date. In my pivot table, I've added the "cost" as a field, which shows the total and this is fine. However, I'd like to add the "cost" as a field again and this time selecting which dates to include in the cost number so that I have two cost fields side by side. Is something like this possible? Hi That is not possible in the same PT. You will need to set up a second PT based upon the same data set as the first but do NOT use the same Pivot Cache to save ...

OLook Locks up when attempting to delete large file in out box.
Outlook keeps trying to send a file that is way too large. I didn't notice it was so large until after a few days of OL being extremely slow and using up my CPU at 100%. How can I delete this file? I have tried going to the outbox and selecting delete, but it will not delete. Can find the location of the data, but not the file that needs to be deleted. Try the easy fix: Select File, Work Offline, Delete the messages "SNR" wrote: > Outlook keeps trying to send a file that is way too large. I didn't notice > it was so large until after a few days of OL being ext...

Anyway to open a Publisher 2002 file in Publisher 2000?
I need to open this file for a project tomorrow. I have Publisher 2000, but I think the file sent to me was done in Publisher 2002 or 2003? The person who sent it to me is out of town until Thursday, so I can't have them resave it or resend it. Any ideas Thanks! In news:11BBD624-9460-465D-88EE-60230ADB1F33@microsoft.com, buck <create007@yahoo.com> posted: > I need to open this file for a project tomorrow. I have Publisher > 2000, but I think the file sent to me was done in Publisher 2002 or > 2003? The person who sent it to me is out of town until Thursday, so > I ...

mail merge in word 2000
Been trying to link a simple 4 column excel db to do a mail merge in Word. Tried following the help instructions, and finally reached the point where I could "insert a merge field" after realizing they left out a number of steps in the instructions. However, when I do enter the mergefield, the only thing I get is "Error! No bookmark name given." There is no mention of "bookmark" in the instructions, no explanation of what a "bookmark" is in this context, and now way I can figure out what the blasted software is talking about. Anybody go...

Designing a report based on a crosstabe
Hello! Hope someone can help cause this is getting into my nerves... I have a crosstabe that I run with a parameter for "date of sales". Date of Sale is my column and the results are showed per month. So I run the query and set the dates from 01/jan/07 to 31/july/07 and the query returns the 7 months I want (mm/yy). How could I design a report that that would run with various parameters? From what I understood so far, the field in the report must necessarily have the name of the result achieved (ex. 01/07, 02/07, 03/07...). Hope I made myself understandable... Cheers everyon...

Match formula to match values in multiple columns
Hi all, does any friend know that how can I make below formula work MATCH(A2,$K$2:$M$30,0) I am not sure I have understood correectly. Please go through the below example With data as below if you need to retrive the name of the 1st Rank holder from London. D2 = 1 D3 = London In D4 apply the below formula =INDEX($B$2:$B$9,MATCH(1,($A$2:$A$9=D2)*($C$2:$C$9=D3),0)) Please note that this is an array formula. You create array formulas in the same way that you create other formulas, except you press CTRL+SHIFT+ENTER to enter the formula. If successful in 'Formula Bar'...

Temp file plague
For some reason my XL2000 if saving reams of temp files (X.TMP) in the folder where I open a worksheet. I haven't intentionally set (or re-set) any preferences for that. Does anyone know what's up here? ...

"files based on content, not file extension" option issue
Hi, I met a strange question. When I disable "files based on content, not file extension" option in IE browser (IE -->Tools Options-->Security-->Internet zone-->Custom level --> "files based on content, not file extension" disable). When I used IE to access ftp://ftp.microsoft.com via. proxy, such as: ccproxy..etc. IE browser shows HTML source code instead of normal html webpage. Could you take a look? Always state your full Windows version (e.g., WinXP SP3; WinXP 64-bit SP2; Vista SP1; Vista 64-bit SP2; Win7; Win7 64-bit) as well...

creating a function for dividing two columns
I am trying to keep track of softball stats. I trying to make a column of batting averages. I have at bats in column b, hits in column c with the results in column d. I cant get the function right so it will display the correct result. use this =SUM(C1/B1) in cell D1. Format D1 as a number with 3 decimal places. Steve Hubbard "cflan" <cflan@discussions.microsoft.com> wrote in message news:212BF952-55B9-45DF-BC8C-E8B670FA6010@microsoft.com... > I am trying to keep track of softball stats. I trying to make a column of > batting averages. I have at bats in column b,...

saving file from asp.net
Hi all, I dynamically generate Word Documents from my web application using XmlDocument object and need to save them on a mapped network drive. I use the Save method of XmlDocument object to save documents. Ican save them successfully on local drive on web server. But when I try to save them on a mapped network drive, I get permission denied errors. I made sure that ASPNET had full access right in the folder where I need to save documents. I also tried using UNC path, but that also does not work. Can someone please point to what I may be doing wrong and explain the whole setup proces...

The merge process detected a mismatch ....
I receive the following message when going offline: "The merge process detected a mismatch ..." I can't read the rest because it goes by too fast. I am finding that contacts and appointments created in MS CRM are not syncing to outlook. Can someone please help? Thanks. There might be more information in the Event Viewer. Please take a look there and post the error here. With kind regards, Ronald Lemmen "Goodloe White" wrote: > I receive the following message when going offline: "The merge process > detected a mismatch ..." I can't ...

what causes the recently used file list option to be unavailable .
Tools / Options / Recently used file list is greyed out - How do I correct this ? John You don't say which version so try searching the knowledge base http://support.microsoft.com/default.aspx With a search string of MRU Disabled in Excel -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS "JohnPrice" <JohnPrice@discussions.microsoft.com> wrote in message news:ECA43906-EC33-4B92-8580-39923E449B9C@microsoft.com... > Tools / Options / Recently used file list is greyed out - How do I correct > this ? Hi! So...

Moving a row from one sheet to another wrongly leaves blank-row artifact.
Moving an entire row within a sheet in Excel XP is implemented correctly: Select the entire row, cut it, go to the target location, and Insert Copied Cells. The target row is inserted (pushing all rows below it down), and the source row is deleted (bringing all rows below it up, as it were). NOT so when the target is in another sheet in the same workbook. Excel inserts the target row correctly, but fails to delete the source row. The row still exists (only it's blanked out). You have to remeber to, tediously, return to the source and delete the blank row. Which means that if you intende...

convert files
how do I import and sort files from First Choice in ASCII form into excel and fix into columns? -- helpoldlady ...

Macro to generate 120 Graphs and put them into ONE sheet
The attached files has 120+ items that need to graphed against the date I have tried to write a script that would automatically graph but ca not: 1) Get the For loop to generate multiple graphs 2) figure out how to arrange the grpahs in ONE sheet neatly Any help is greatly appreciated. Thank you !!! Shankar -- Message posted from http://www.ExcelForum.com sorry - here is the fil Attachment filename: tester.xls Download attachment: http://www.excelforum.com/attachment.php?postid=66758 -- Message posted from http://www.ExcelForum.com If you don't n...

cannot filter excel files in "files of type"
I have Outlook 2003, and when I try to add an attachment, I cannot filter based on Excel files in "Files of type". Excel is the listed but other like Word are. The entire Office 2003 suite is installed on the PC and I tried reinstalling to no avail. Also, Customize is grayed-out under the tools menu in Outlook\new mail message. Please help me out. thanks. Sorry, I mean to say Excel is NOT listed under "Files of Type" "wli2k2" wrote: > I have Outlook 2003, and when I try to add an attachment, I cannot filter > based on Excel files in "Files ...

how do i open a publisher file created in new version?
I get publisher files in new versions of publisher. I have publisher 2000. I can't open these files but don't want to update publisher. Is there a download program I can get to translate these files? "Peg" <Peg@discussions.microsoft.com> wrote in message news:4BD8AEDC-8386-4E7B-9D12-DAF429B171A2@microsoft.com... >I get publisher files in new versions of publisher. I have publisher 2000. > I can't open these files but don't want to update publisher. Is there a > download program I can get to translate these files? There is not a download to tra...

SumIf
Hi =SUMIF(A6:A2000,"(left(a6:a2000,4))=(left($K$14,4))",F6:F2000) I want to create a sub total of all values in column F, at certain subtotal cells in column F where the the first 4 (or other to be set)characters of a code in cells a6 to a2000 match the first 4 characters in cell$K$14 (or other cell to be set). The above doesn't seem to work, is it possible? am I missing something? Any help would be greatly appreciated. Ritchi Try this array* formula: =SUM(IF(LEFT(A$6:A$2000,4)=LEFT($K$14,4),F$6:F$2000,0)) * As this is an array formula, then once you have typed it in (or s...

Counting number of rows based on mutiple criteria
Does anyone know how to count the number of rows based on mutiple criteria on other columns? For example I want to count the number row that meet the criteria of "Yes" in Col 2 and "Yes" in Col 3. The result would be 2 in the example below. I tried different combinations of Vlookup, Countif and Sumif and could not come up with anything that worked. Col 1 Col2 Col3 A Yes No B Yes Yes C No No D No Yes E Yes Yes Your help is greatly appreciated! Hi, =SUMPRODUCT((B1:B10=&qu...

Help!!Getting audio files to play continuously during slide show?!
I have Powerpoint 2002, and i am having a hard time getting the music file to play continuously during the slide show. it plays on the first slide (which is the only slide that has the little speaker picture on it), but then it doesn't transition to the next slide until after the song is done, when i want the song to play while the slides are transitioning. HELP please! Mega, Have a look here and see if it helps, there are tuturials in video demonstrating the process. http://www.pptfaq.com/FAQ00047.htm -- Luc Sanders MVP - PowerPoint "MegaB86" <MegaB86...

Open outlook express eml files with Office Outlook
How can I get my Microsoft Outlook e-mail software to open a Outlook Express .eml file save on a network. My objective is to be able to double click the .eml file or drag and drop it into my Microsoft Outlook application. Thank you, LS Lance <llscott@csicable.net> wrote: > How can I get my Microsoft Outlook e-mail software to > open a Outlook Express .eml file save on a network. My > objective is to be able to double click the .eml file or > drag and drop it into my Microsoft Outlook application. You have to open in with Outlook Express and then move it to Outlook fro...