+ Reply to Thread
Results 1 to 5 of 5

Delete rows based on stored values in a seperate sheet

  1. #1
    Registered User
    Join Date
    09-17-2013
    Location
    dubai
    MS-Off Ver
    Excel 2007
    Posts
    5

    Delete rows based on stored values in a seperate sheet

    HI all,
    Hoping someone can help. Will greatly appreciate all assistance. I have researched the issue online quite alot and havent been able to get much direction.
    I have a spreadsheet with 6 worksheets. Sheet 1 contains a column which states no. of rows allowed in the remaining tabs. Basically its a random sampling project where a statistical sample is being retreived from larger populations. Sheet 1 contains the value of the calculated sample size and now i need to implement a macro whicj will go through the remaining worksheets and delete all rows after the sample row numbers shown in sheet 1.

    I am posting an example file for easier reference. Hope someone can assist.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Delete rows based on stored values in a seperate sheet

    Hello,

    Place this code in a module and run the one named MainCode

    Please Login or Register  to view this content.
    Thanks

  3. #3
    Registered User
    Join Date
    09-17-2013
    Location
    dubai
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Delete rows based on stored values in a seperate sheet

    Works like a charm. Thank you soo much!!!

  4. #4
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Delete rows based on stored values in a seperate sheet

    You are welcome

  5. #5
    Registered User
    Join Date
    09-17-2013
    Location
    dubai
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Delete rows based on stored values in a seperate sheet

    Have one quick question. How would the code differ if Sheets("Stored values") is a sheet in a seperate workbook. Everything else remains same

+ 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. [SOLVED] Seperate Comma seperated values in seperate rows in different tab of same worksheet
    By amlan009 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-28-2012, 04:54 AM
  2. [SOLVED] Help with macro to delete rows based on values
    By jimstrongy in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-26-2012, 08:49 AM
  3. Delete Rows In Sheet 1 Based Off Of Criteria On Sheet 2 Column A
    By Pfafkl13 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-23-2011, 06:35 PM
  4. Delete Rows based on Values in a column
    By Recycle_Bin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-21-2009, 04:36 PM
  5. Delete rows based on values in another cell
    By jimboc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2007, 08:54 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