+ Reply to Thread
Results 1 to 28 of 28

Delete all

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    540

    Re: Delete all

    OK.

    I think that the attached version is getting close to what you're looking for but I need to clarify this statement:

    "the sheet remains but it should also delete the data in the no colour cells. e.g. for each sheet linked to a row, cell content for cell, C4,E4,G4,C6,E6,G6,C8,E8,G8, merged cells (C-G) in rows 10,12,14,16,18,20,22 and 24"

    In the sample sheets you supplied, there were only formulae in cells C4,E4,G4,C6,E8,G8. You seem to indicate that there are going to be formulas in other cells.
    To accelerate insertion of formulas, I've added a button at bottom left of the FRONT sheet which uses a macro to automatically add the relevant formulas to each of the 18 sheets added.
    You can test this button's functionality by deleting the sample formulas you show on the added sheets and then clicking the button to reinsert them.
    However, at present, the macro only adds links to the 6 cells your sample supplied. If there are additional cells with formula, please upload a version with 1 sample sheet showing ALL formulas.

    Please note that when you click the 'Delete all' button on the FRONT sheet, the linked sheets will display blanks for any cells linking back to row of the FRONT sheet from which data was deleted.
    This seems to satisfy your requirement to delete the data in the no colour cells. Let me know if I'm misunderstanding.
    Attached Files Attached Files
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

  2. #2
    Registered User
    Join Date
    08-20-2019
    Location
    UK
    MS-Off Ver
    2019
    Posts
    17

    Re: Delete all

    Hi Deadly duck
    It's nearly there
    The white cells in rows 10,12,14,16,18,20,22 and 24 won't have formula's as they will be free text

    The "Add formula to sheets" has done it's job and thus makes it self redundant, so all sheets have the formulas as required, just need "delete all" to include the rows (white cells) above
    I must admit I wasn't looking forward to the linking job.

    as to the delete all button, I could do with that being visible at the end of each row again with the protective pop up.

    As I work with a group of people who could delete the internet so to speak, it is my intention to lock everything that I don't want them to mess about with otherwise I'll be doing repairs every time I come to work. So all they can do is use drop downs or free text as per cell rules (number formats or text etc).

    thanks for your work so far
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    540

    Re: Delete all

    OK.

    My head is spinning a bit after this so I hope this version has you sorted!

    I added a code which allows you to show or hide the Add formulas to sheets button- to show the button, type "show" in cell C1 of the FRONT sheet (no inverted commas, case sensitive). To hide it, type "hide" (same rules).

    The 'Delete all button is generally visible at the extreme right of the FRONT worksheet, occasionally a little cut off but I ended up not grasping the nature of how it has to be positioned.
    Clicking it deletes any free text from the relevant sheet as well as the specified content on the FRONT sheet.
    Attached Files Attached Files

+ 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] Delete Method of Range Class Failed on SpecialCells(xlCellTypeBlanks).EntireRow.Delete
    By BFid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-06-2021, 11:27 AM
  2. [SOLVED] Adding delete code on userform to delete a row on sheet by selecting item on a listbox
    By darbar76528 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-07-2020, 12:50 PM
  3. VBA code to delete the FILTERED range and moving the cell up (dont Delete entire row)
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2015, 07:48 AM
  4. Replies: 1
    Last Post: 11-30-2013, 06:37 AM
  5. [SOLVED] Macro to delete sheets and saves remaining file does not properly delete module
    By pherrero in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2005, 08:12 PM
  6. [SOLVED] Re: Macro to delete sheets and saves remaining file does not properly delete module
    By bhawane in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2005, 01:05 PM
  7. [SOLVED] Re: Macro to delete sheets and saves remaining file does not properly delete module
    By pherrero in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2005, 01:05 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