+ Reply to Thread
Results 1 to 8 of 8

Pulling information from master sheet onto subsheets automatically

  1. #1
    Registered User
    Join Date
    03-27-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Pulling information from master sheet onto subsheets automatically

    Hi, i'm have a master spreadsheet of contact details and categories. i want to be able to pull contact information onto other sheets within the same workbook, based on category. example attached.
    Attached Files Attached Files
    Last edited by catty; 03-29-2009 at 11:12 PM. Reason: changed title as requested by moderator

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Not sure if vlookup is the right function

    Hi Catty, and welcome to the forum.

    The following code should copy each row from the Master sheet to its respective sheet (Hot, Cold or Warm). It does not remove the rows from the Master sheet (although that is possible).
    Please Login or Register  to view this content.
    The code does not fill in column A on any of the Hot, Cold or Warm sheets, since that seems to be somewhat obvious. If you want it filled in automatically, that can also be done.

    To add the code, right-click on the Master sheet tab, click View Code. Paste the code shown above into the VB Editor window that appears, then close the VB Editor. To run the macro, press ALT+F8, select "catty" from the list of macros, then click Run.

    Hope that helps!

  3. #3
    Registered User
    Join Date
    03-27-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Not sure if vlookup is the right function

    Hi Paul, that works but I have 2 questions:

    1) the category is likely to change. If it is changed in the master sheet, does it pull through to the other sheets?
    2) Is there an excel formula that can do this, instead of Visual Basic code?

    Thanks!

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Not sure if vlookup is the right function

    Yes, you could do this using formulae but if you go down that route you would should strongly consider adding some "helper" cells to avoid need for Array formulae as this will slow the file... perhaps the attached may be of interest ?
    (note: .xlsx extension)

    Once the file is saved you could populate A1 with the name of the active sheet rather than entering manually.

    I'm not saying you should disregard the VBA apparoach - pending volume of data it may well be the best option available to you
    (Note: I would however advise that you adapt pjoaquin's code such that references to Range("A65536") become Cells(Rows.Count,"A"), given you're running XL2007 65536 is no longer the definitive final row available).

    You could also consider using Pivot Tables of course...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-27-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Not sure if vlookup is the right function

    Thanks for this - both solutions work so I will see which one I am more comfortable with!

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Not sure if vlookup is the right function

    catty, please take a few minutes to read the forum rules about thread titles (and in general) before starting your next thread. This is your freeby.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Registered User
    Join Date
    03-01-2013
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Pulling information from master sheet onto subsheets automatically

    How do you get the sheets to refresh or update if you add more to the list? Ie. I added something to line 19 on the master sheet, but it didn't copy over to the Hot sheet.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Pulling information from master sheet onto subsheets automatically

    Maybe run the macro again and see.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1