Populating addresses from Sheet 1 to Sheet 2

jchrisphonte

New Member
Joined
Jun 21, 2009
Messages
37
Hello Everyone,

I currently have a workbook with 2 sheets - Sheet 1 is company names and sheet 2 is contact names...

All companies on sheet1 have a unique identifying number which can also be found on the contacts sheet to differentiate which contacts belong to which companies...

Here's the problem...

I have to enter in thousands of contacts to sheet 2, I have the company id, company name, contact name, and jobtitle....yet the address fields are always going to be the same as the ones from the same company on sheet 1. What I want the excel sheet to do is once i enter a new row and enter id# 551 for example it will fill the address, city, state, zip, phone and fax numbers to be exactly as they are on sheet 1 for company 551.

Hope this makes sense

Is this even possibe??

Thank you again in advance for your help - I am a big fan of this community...
Heres a visual below:

Sheet 1 -Companies

Excel Workbook
BCEFGHIJKL
25511794 Commodore Funds400 Madison AvenueSuite 9DNew YorkNY10017(212) 651-0502(212) 651-0500(212) 651-0503
35522480 Capital Partners, L.P.316 Yankee Trace DriveCentervilleOH45458(937) 238-0021(937) 227-9364
455327 Capital Management LLC9 Lincoln StreetWestonMA02493(781) 893-2715(781) 893-2715
555436 South Investment Managers LtdPrince's Wharf, 147 Quay StreetSuite 24AucklandNew Zealand1143+64 (0)9 306 1897+64 (0)9 302-2767
655536ONE Asset Management (Pty) Ltd6A Sandown Valley CrescentSandownSouth Africa02196+27 (11) 722 7390+27 (11) 722 7391
75443A Alternative Asset Advisors (Syz & Co Bank)Rue du Rhone, 30-909Case Postale 5015GenevaGenevaCH-1211+41 22 819 9800+41 22 819 0904
85563C Asset ManagementBulevardi 10 AHelsinkiFinland00120+358 9 3481 5190+358 9 3481 5151
943G Capital Management LLC800 Third Avenue38th FloorNew YorkNY10022(212) 893-6727(212) 893-6728
Funds


Sheet 2 -Contacts

Excel Workbook
BCDEFGHIJKL
1Company IDManagement CompanySalutationSurnameForenameJob TitleAddressFloorCityStateZip
25511794 Management L.P.Ms.SafranekBarbaraBusiness Development400 Madison Avenue, Suite 9D, New York, NY, 10017
35511794 Management L.P.Mr.CafieroYolandaCFO400 Madison Avenue, Suite 9D, New York, NY, 10017
45511794 Management L.P.Mr.WebberJeffrey A.Chairman, CEO400 Madison Avenue, Suite 9D, New York, NY, 10017
55511794 Management L.P.Mr.GerardRupertInvestment Analyst400 Madison Avenue, Suite 9D, New York, NY, 10017
65511794 Management L.P.Mr.LealOscarManaging Director400 Madison Avenue, Suite 9D, New York, NY, 10017
75511794 Management L.P.Mr.HellerPrestonSenior Analyst400 Madison Avenue, Suite 9D, New York, NY, 10017
85522480 Capital Holdings, LLCMr.GilesThomasFund Manager316 Yankee TraceCenterville, OH 45458
955327 Capital Management LLCMr.OkurowskiLeeFund Manager9 Lincoln Street,Weston, MA 02493
1055327 Capital Management LLCMr.MusumeciRossPartner9 Lincoln Street,Weston, MA 02493
1155436 South Investment Managers LtdMr.PretoriusDavidMarketing ManagerPrince's Wharf, 147 Quay Street, Auckland 1143, New Zealand
1255436 South Investment Managers LtdMr.HaworthRichardPrinciple/AssociatePrince's Wharf, 147 Quay Street, Auckland 1143, New Zealand
1355536ONE Asset Management (Pty) LtdMr.JacobsCyFund Manager6a Sandown Valley CrescentSandownSandton2196
1455536ONE Asset Management (Pty) LtdMr.LiptzStevenFund Manager6a Sandown Valley CrescentSandownSandton2196
1555536ONE Asset Management (Pty) LtdMs.De AbreauTanyaFund Manager6a Sandown Valley CrescentSandownSandton2196
1655536ONE Asset Management (Pty) LtdMr.IsaacsDanielManagement Consultant6a Sandown Valley CrescentSandownSandton2196
1755536ONE Asset Management (Pty) LtdMs.SlatterLauriePrinciple/Associate6a Sandown Valley CrescentSandownSandton2196
1855536ONE Asset Management (Pty) LtdMr.SeabornRyanPrinciple/Associate6a Sandown Valley CrescentSandownSandton2196
Contacts


Also keep in mind that most contacts do not have an address that can be split to columns like these examples


Jerry
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Re: PoPopulating addresses from Sheet 1 to Sheet 2

Are you going to enter every name in the Fund sheet into the Contact sheet or just selected funds??
 
Upvote 0
Re: PoPopulating addresses from Sheet 1 to Sheet 2

If more than one contact howdose the second, third, etc contacts appear in the Funds list?

Any reason why the whole Funds list can not be added to the Contacts list all at once??
 
Upvote 0
Re: PoPopulating addresses from Sheet 1 to Sheet 2

Hey Bill,

For the second,third and beyond contacts the address fields will appear just as the first would.

Good question about using one sheet instead - unfortunately this is being fed into the back end of a website...all the columns have to be the same as they were when built

So yes, we do have to keep the format of two sheets.
 
Upvote 0
Re: PoPopulating addresses from Sheet 1 to Sheet 2

For the second,third and beyond contacts the address fields will appear just as the first would.
Does this mean the Fund number is repeated in column B for each contact for that fund? Can you post a sample of multiple contacts for a single fund?


Any reason why the whole Funds list can not be added to the Contacts list all at once??


What I'm asking is can't the Contacts sheet be updated by looping through the Funds sheet and copying each Fund to the Contacts sheet?

Did you want to copy which includes formats or just assign the values from the Funds sheet to the Contacts sheet?
 
Upvote 0
Re: PoPopulating addresses from Sheet 1 to Sheet 2

Hey Bill,

Yes - The Fund number is repeated in column B for each contact for that fund. I postedan image earlier to help... if you look at company 551 there are 6 contacts that all share the same company identifier.

i understand your question now, I would like to just assign the values from sheet 1 to sheet 2
 
Upvote 0
Re: PoPopulating addresses from Sheet 1 to Sheet 2

Put this code in the Contacts sheet code module. IF you enter a correct Funds number in column B of the Contacts sheet the procedure will assign the address, etc. from the Funds sheet to the Contacts shhet
Code:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim rngFunds
    Dim FundsRow As Long
    Dim ContactsCol As Integer
    If Intersect(Target, Columns(2)) Is Nothing Then Exit Sub
    With Sheets("Funds")
        Set rngFunds = .Range("B1", .Range("B65536").End(xlUp))
        FundsRow = 0
        On Error Resume Next
        FundsRow = rngFunds.Find(Target.Value, LookIn:=xlValues, lookat:=xlWhole).Row
        If FundsRow = 0 Then
            MsgBox Target.Value & " Fund does not exist."
            Exit Sub
        End If
        Application.EnableEvents = False
        For ContactsCol = 8 To 15
            Sheets("Contacts").Cells(Target.Row, ContactsCol) = .Cells(FundsRow, ContactsCol - 4)
        Next ContactsCol
        Application.EnableEvents = True
    End With
End Sub

If you have the Contact names already in a worksheet then I suggest a loop to assign all the addresses, etc. Let me know and I will give provide code for a loop.
 
Upvote 0

Forum statistics

Threads
1,215,480
Messages
6,125,050
Members
449,206
Latest member
Healthydogs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top