+ Reply to Thread
Results 1 to 8 of 8

delete entire active cells row/s only if thet all inside of a table (whatever table it is)

  1. #1
    Forum Contributor
    Join Date
    05-12-2013
    Location
    Tel Aviv, Israel
    MS-Off Ver
    Excel 2021
    Posts
    112

    delete entire active cells row/s only if thet all inside of a table (whatever table it is)

    hello excelers,

    Is it possible to make it work if the active cells inside any table and not just specific one ? and that the code will know which entire rows included in the active cells ?

    it seems like a tough one

    hope for a miracle on this one,

    thank for any help at all,

    best regards,

    netanel
    Last edited by netanel99; 07-02-2017 at 10:51 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: delete entire active cells row/s only if thet all inside of a table (whatever table it

    Please clarify

    Please clarify exactly what you are trying to do. Upload a workbook with a before and after situation so that we can understand the end goal.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: delete entire active cells row/s only if thet all inside of a table (whatever table it

    You cannot have active cells. You can select a range of cells, but only one cell is Active.

    Perhaps this thread will help.
    VBA delete table row based on selection
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Forum Contributor
    Join Date
    05-12-2013
    Location
    Tel Aviv, Israel
    MS-Off Ver
    Excel 2021
    Posts
    112

    Re: delete entire active cells row/s only if thet all inside of a table (whatever table it

    I'm sorry, I'll clarify more,

    my end goal is a button that checks if the selected cells (thanks AF) are inside of a table (all of the selected cells) , and if the selected cells are all inside a table it will delete the entire rows of the selection, and if the selected cells are not all inside one table then it won't do nothing

    really hope for something that will work on every table, and could either delete few rows If there was multiple selected cells, or one entire row if the selected cell/s are in one row, in every other situation nothing will be done by the macro.

    is it possible to have this work ? I've seen a code that works but it takes 4 min for me to use that code to delete 70 rows all in once.

    thanks for your willingness to help and your knowledge ! really.

  5. #5
    Forum Contributor
    Join Date
    05-12-2013
    Location
    Tel Aviv, Israel
    MS-Off Ver
    Excel 2021
    Posts
    112

    Re: delete entire active cells row/s only if thet all inside of a table (whatever table it

    I've found this place , it does everything perfectly , My one and only problem with that is that it deletes the table's row and not the entire rows , is it possible you could modify it just so it'll delete the entire rows because it seems that the guy who done this made very prolong and hard work on it and very proud of his creation, and it's works great. he put a function that must be added also in order for the main "sub" to work.

    https://www.thespreadsheetguru.com/t...eet-protection

    thank u so much again!

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: delete entire active cells row/s only if thet all inside of a table (whatever table it

    As said, please upload YOUR workbook.

    We often find that when we give an answer to what is a trivial non representative example when the solution is used with the real world data it doesn't work because of factors like string length and other stuff which is important but hasn't been mentioned.

    Therefore upload your real workbook (or at least a cut down copy), and manually add the results you expect to see. Clearly identify which is original data and which are the results and in a note clearly explain how you have arrived at your results.

    Would you also change your location to something meaningful. It often helps when we have to consider regional settings or date formats and other stuff.

  7. #7
    Forum Contributor
    Join Date
    05-12-2013
    Location
    Tel Aviv, Israel
    MS-Off Ver
    Excel 2021
    Posts
    112

    Re: delete entire active cells row/s only if thet all inside of a table (whatever table it

    You are absolutely right, thanks for the patience and continuation .


    This example includes a Working code -which is great,
    the only problem it deletes the row inside the table - I really hope it will delete the entire rows - because then all my pictures and shapes bellow won't be messed up.

    I'm really hoping there is an easy adjustment on this one.
    thanks again and again.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    05-12-2013
    Location
    Tel Aviv, Israel
    MS-Off Ver
    Excel 2021
    Posts
    112

    Re: delete entire active cells row/s only if thet all inside of a table (whatever table it

    ahh... unbelievable I think I made it by a chance .
    I just changed
    Please Login or Register  to view this content.
    to this one
    Please Login or Register  to view this content.
    and apparently, everything works perfectly, Doubled checked I think it's ok, This guy's nick: thespreadsheetguru he's got a site , seems like he just invested hours on this, 360 degree works.
    Last edited by netanel99; 07-02-2017 at 01:50 PM.

+ 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. Copy - Paste entire table into one cell using active cell formula
    By alexgoaga in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-08-2017, 10:14 AM
  2. [SOLVED] Can't delete entire row based on condition in table range.
    By Tapyr in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2016, 11:01 AM
  3. [SOLVED] Delete entire row in table if cell in column P contains any value (numbers or text)
    By BuntyMac in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-29-2016, 02:49 PM
  4. Format active cells as a table via VBA
    By stevee_p in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 07:39 AM
  5. Sort entire table using by currently-active column
    By teamcary in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-11-2013, 03:41 PM
  6. How to remove horizontal lines from inside table cells?
    By Reema in forum Word Formatting & General
    Replies: 4
    Last Post: 07-20-2009, 04:10 AM
  7. [SOLVED] How do I link a cell outside a pivot table to one inside the table
    By GPGTDRVR in forum Excel General
    Replies: 3
    Last Post: 08-16-2006, 09:50 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