+ Reply to Thread
Results 1 to 6 of 6

Rows delete formula as per range of cell values with counter to delete # rows

  1. #1
    Registered User
    Join Date
    03-01-2017
    Location
    france
    MS-Off Ver
    2010
    Posts
    10

    Exclamation Rows delete formula as per range of cell values with counter to delete # rows

    Rows delete formula as per range of cell values with counter to define how many rows to be deleted

    Rows delete formula as per range of cell values with counter to define how many rows to be deleted

    Hi,

    I have DB with 50000 rows i have specific cell value A:A

    MAX cell value countIF of each specific value of A:A = 31. (Let say Abraham name came in 31 rows in column A:A similary steve also 31 no value will NOT go above 31 as system rule.

    Requirement :

    I want to use cell value A:A as reference rage for row deletion and would like to delete 5 rows from DB per cell Value


    Example

    Cell Range: A:A
    How many rows you would like to delete : 4 (lets say 4 so it will delete 4 rows as per cell value) like out of 32 values 4 will be deleted from peter and similarly 4 will be deleted from Abraham.

    Task:

    SO COUNTIF of cell value 31 and new request for specific customer came i am able to delete rows with counter lets say 4 to add four new records in DB.

    Bets of Luck!

    I love it if its MACRO in vbscripts
    Attached Files Attached Files
    Last edited by qureshi2016; 11-30-2017 at 08:36 AM. Reason: attachment

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Rows delete formula as per range of cell values with counter to delete # rows

    Just for clarification: You want to delete the requested number of rows from each name that has 31 occurrences in column A. If a name has less than 31 occurrences, then you don't want to delete any rows. Is this correct?
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    03-01-2017
    Location
    france
    MS-Off Ver
    2010
    Posts
    10
    Quote Originally Posted by Mumps1 View Post
    Just for clarification: You want to delete the requested number of rows from each name that has 31 occurrences in column A. If a name has less than 31 occurrences, then you don't want to delete any rows. Is this correct?
    Yes 31 occurrences

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Rows delete formula as per range of cell values with counter to delete # rows

    The macro assumes that there are no empty cells in column A and that the data is sorted according to name.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-01-2017
    Location
    france
    MS-Off Ver
    2010
    Posts
    10

    Re: Rows delete formula as per range of cell values with counter to delete # rows

    Thanks a lot great way to help others in need

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Rows delete formula as per range of cell values with counter to delete # rows

    You are very welcome.

+ 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] Add Column Cell Values Within Range Selection. Delete Rows
    By Ray Storm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2015, 07:42 PM
  2. VBA to delete rows with not specified cell values
    By alper93 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-05-2013, 10:43 PM
  3. Macro to delete entire rows if cell values do not match list/named range.
    By swolfe2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2013, 02:13 PM
  4. Replies: 5
    Last Post: 11-12-2012, 08:38 PM
  5. delete rows when values in cell =0
    By tdyl1969 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2009, 03:59 PM
  6. macro to delete rows with a range for values
    By poole in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-28-2009, 02:18 PM
  7. Delete Rows based on cell value and then Insert rows alternatively with a formula
    By acsishere in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-11-2008, 04:27 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