+ Reply to Thread
Results 1 to 6 of 6

Keeping one country from a sheet and deleting the rest

  1. #1
    Registered User
    Join Date
    01-08-2012
    Location
    Morocco
    MS-Off Ver
    2010
    Posts
    3

    Keeping one country from a sheet and deleting the rest

    Hi you all,

    Every quarter I receive an Excel file with lots of countries and several sheets with different variables being measured for each country company. What I'm supposed to do with it is to create an Excel file for every country. What I'm doing until now is just deleting it manually, which takes a lot of time.
    I uploaded a simple example file. First sheet is the original output structure, usually coming with 20-25 sheets measuring different variables from several companies and countries. In the example, for the sake of simplicity, I just put two countries: the UK and France. Second sheet is what I need to produce, keeping only the UK and deleting France. Of course, I also have to do one file with only France.

    I hope I've made myself clear so you can help me with this.

    Thanks.

    Example file

  2. #2
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Keeping one country from a sheet and deleting the rest

    Cross-post;
    http://stackoverflow.com/questions/2...eting-the-rest
    http://www.mrexcel.com/forum/excel-q...ting-rest.html

    Read this:http://www.excelguru.ca/content.php?184
    Please click the * Add Reputation if this helps
    If solved remember to mark Thread as solved

    "I'm glad to help and this is not meant to sound smart, but either you have super-human vision to see all those controls cleared one by one with the code I posted, or your computer is really slow."

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Keeping one country from a sheet and deleting the rest

    Hi, welcome to teh forum

    Please upload yout sample workbook to the forum, not all members are able - or willing - to access file hosting sites.

    Having said that, is it really necessary to create new files for each country? Could you not just have each country on it's own sheet within the same file/workbook?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    01-08-2012
    Location
    Morocco
    MS-Off Ver
    2010
    Posts
    3

    Re: Keeping one country from a sheet and deleting the rest

    Yes, it doesn't matter if it's in the same workbook

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Keeping one country from a sheet and deleting the rest

    OK then there are ways to extract from 1 sheet to another, based on criteria (country, in your case)

    Upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

  6. #6
    Registered User
    Join Date
    01-08-2012
    Location
    Morocco
    MS-Off Ver
    2010
    Posts
    3

    Re: Keeping one country from a sheet and deleting the rest

    Answer by a Reddit user:

    Please Login or Register  to view this content.

+ 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. Keeping specific cell contents while deleting the rest?
    By Winterreise in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-10-2012, 05:11 PM
  2. [SOLVED] Keeping part of Formula constant whilst the rest changes.
    By Manuel Pedro in forum Excel General
    Replies: 2
    Last Post: 05-15-2012, 03:13 AM
  3. keeping value after deleting the source
    By mrggutz in forum Excel General
    Replies: 1
    Last Post: 09-17-2010, 01:44 PM
  4. Add ‘country name’ column to worksheet from a list of country codes.
    By Ben Morton in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2009, 09:24 AM
  5. Replies: 3
    Last Post: 08-01-2007, 01:09 PM

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