+ Reply to Thread
Results 1 to 7 of 7

Deleting rows where equation results are ""

  1. #1
    Registered User
    Join Date
    05-14-2019
    Location
    Provo, Utah
    MS-Off Ver
    2013
    Posts
    26

    Deleting rows where equation results are ""

    Im stuck on this code
    Please Login or Register  to view this content.
    I think because there are equations in the blank cells that this isnt working.

    I also would like to make this code go through and do this on two specific tabs, "Header_Credits", and "Header_Bills".

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Deleting rows where equation results are ""

    Test this on a copy first.

    Please Login or Register  to view this content.
    Just a note of observation: Using a reserved word like EntireRow as a variable is not a good practice and can result in undesired results because the compiler may treat the word differently than you expect.
    It is better to use fragments of words or abbreviations as your variables, but not the same as the constants reserved by VBA for executing specific functions in Excel or other MS applications.
    Last edited by JLGWhiz; 12-29-2020 at 12:18 PM.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    05-14-2019
    Location
    Provo, Utah
    MS-Off Ver
    2013
    Posts
    26

    Re: Deleting rows where equation results are ""

    This works great! How would I make it loop through each row through the 2 tabs referenced in my original post?

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Deleting rows where equation results are ""

    Quote Originally Posted by Glervey View Post
    This works great! How would I make it loop through each row through the 2 tabs referenced in my original post?
    We know which sheets you want to apply it to, but it is extremely difficult to figure out what you have selected.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-14-2019
    Location
    Provo, Utah
    MS-Off Ver
    2013
    Posts
    26

    Re: Deleting rows where equation results are ""

    This only does one line at a time and if it falls on a cell with values it gets stuck

  6. #6
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Deleting rows where equation results are ""

    Quote Originally Posted by Glervey View Post
    This only does one line at a time and if it falls on a cell with values it gets stuck
    let me try to be clearer. We cannot help you with what you want to do because we do not know what range on the sheets you have selected. If you can provide us with the range of rows to check for each sheet, then somebody can respond with code that would do what you wnat.

  7. #7
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Deleting rows where equation results are ""

    This code will look at the entire sheet of data. If you do not want the entire sheet evaluated, don't try this code.

    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. [SOLVED] Preventing errors when deleting rows when there's a "worksheet change" event
    By dcwan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-01-2020, 07:36 PM
  2. [SOLVED] Deleting Rows based on cell NOT equal to ("0200", "0400")
    By gz3s36 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-11-2020, 01:35 PM
  3. Replies: 35
    Last Post: 01-13-2016, 02:16 AM
  4. Replies: 1
    Last Post: 01-07-2014, 09:08 AM
  5. Macro for deleting rows which have texts belonging to a "remove list"
    By lanief in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2013, 01:55 PM
  6. "Object required" error with VBA loop rows deleting
    By JKWIN in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2012, 09:31 AM
  7. VBA Code for deleting rows where cell in column a states "delete row"
    By tnfire in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-20-2009, 06:17 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