+ Reply to Thread
Results 1 to 8 of 8

Importing selected rows from one datasheet to another using conditions

  1. #1
    Registered User
    Join Date
    03-05-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Importing selected rows from one datasheet to another using conditions

    Hi All

    I'm trying to do something which I thought was simple using indexing and conditions but I cant get it to work.

    My second datasheet is supposed to pull only selcted rows of sales opportunity data into a commission sheet based on conditions such as salesman (using Initials) and whether an opportunity was converted into a sale.


    I have enclosed an example of the data and the output I would expect to see.

    If anyone knows how to do this it would be a big help.

    Thanks

    PJR
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Importing selected rows from one datasheet to another using conditions

    Secondary sheets are truly not needed. You can get the same results with no additional plumbing/maintenance by simply turning on the Data > Filter for the first sheet. Once that is on, filter column E for "contains MB" and voila! Same list. Done. You can edit, print, copy, whatever. No need to deal with the added baggage of additional sheets. This is what the Autofilter was created for.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-05-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Importing selected rows from one datasheet to another using conditions

    Hi

    Thanks for this. Unfortunately its not a solution to my problem as it would allow the sales person the ability to see everyone else's earnings by just changing the filter. It needs to be information which is only applicable to them and their sales.

    The data is dynamically ceated for another workbook and I have tried protecting the sheet disabling the ability to change the filter however this does not work on new dynamically created data.

    Any further thoughts?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Importing selected rows from one datasheet to another using conditions

    Personally, I would never hand a person a copy of a workbook that had data in it (hidden or not) that they weren't ALLOWED to see at all. Excel is by no means secure. Most users, fine, they can be controlled, but all it takes is the *slightest* bit of interest and boldness and a few Google searches and everything in your workbook will be unlocked.

    If you must hand out information to individuals that is an excerpt, it should be truly excerpted, and not by formula. I would print a PDF of each agent's rows of info from this main sheet (again, no other sheets needed, all done from this sheet with a Filter) and give them the PDF.

  5. #5
    Registered User
    Join Date
    03-05-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Importing selected rows from one datasheet to another using conditions

    I understand the point you make however the workbook which dynamically creates the rows of conditional data is secure and it is impossible for the individual to open the original (something I'm very familiar with). The example workbook enclosed with the datasheet is an example of the datasheet we have on a secure server. It is purely the simple conditional indexing I was having an issue with as it was pulling in all the data and not the selected salesperson. I thought a fresh pair of eyes might help me find a quick solution.

    I understand if this is not something that you consider pratical or worthwhile however it is to our business. Real time sales and payment details are essential to our sales team.

    Thanks for your time in responding to my question anyway.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Importing selected rows from one datasheet to another using conditions

    How about this?
    Change the name of sheet to choose the salesman.
    Or copy to the new sheet and rename it to new salesman
    Attached Files Attached Files
    Quang PT

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Importing selected rows from one datasheet to another using conditions

    Please see attached file. There is a new sheet named "MB" with formulas. To change the the name of the salesperson simply enter new initials in cell M1
    Attached Files Attached Files
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  8. #8
    Registered User
    Join Date
    03-05-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Importing selected rows from one datasheet to another using conditions

    Thanks to you all.

    A special thank you to both bebo021999 and AlKey . Both solutions worked fine as the sheets can be password protected.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA for display Various Datasheet data in Masterdatasheet when we choose datasheet name
    By santosh226001 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-08-2014, 10:21 AM
  2. [SOLVED] How do I copy and past selected rows to a new sheet when multiple conditions are met?
    By Terri H in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-28-2013, 09:36 AM
  3. Replies: 2
    Last Post: 10-01-2009, 09:32 AM
  4. Importing selected cells into VBA
    By tryer in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-12-2008, 05:54 PM
  5. I need Help - Importing name files to datasheet
    By raraujo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-28-2005, 03:16 PM

Tags for this Thread

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