+ Reply to Thread
Results 1 to 4 of 4

Deleting Row containing YES added to an existing macro for input

  1. #1
    Registered User
    Join Date
    02-01-2013
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Deleting Row containing YES added to an existing macro for input

    Good Afternoon, I am a novice to excel and i am looking to add a delete row to function to the invoiced macro. If a yes is added to the Hire Regester sheet via my Invoice Macro i would like it to delte the whole row is this possible. any advice would be greatly received. Thaks in advance
    Attached Files Attached Files
    Last edited by stephenwalter; 02-10-2013 at 10:15 AM.

  2. #2
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    926

    Re: Deleting Row containing YES added to an existing macro for input

    Have a try, in your Module3 code change:
    Please Login or Register  to view this content.
    to:
    Please Login or Register  to view this content.
    Also, starting with x=7 would be better since your data is from row 8.
    And why ".UsedRange.Rows.Count + 20" ? wouldn't ".UsedRange.Rows.Count - 1" be better.
    Last edited by rollis13; 02-10-2013 at 11:17 AM.

  3. #3
    Registered User
    Join Date
    02-01-2013
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Deleting Row containing YES added to an existing macro for input

    Rollis,
    Thanks very much, like i said am new to all this I am using formulas i have found on the web and ones from peoples help and trying to adjust them to my needs.

    whats the difference between ".UsedRange.Rows.Count + 20" ? wouldn't ".UsedRange.Rows.Count - 1"

  4. #4
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    926

    Re: Deleting Row containing YES added to an existing macro for input

    What you need in your macro is determine the last used row so you can end the macro when all data has been checked. With lastrow+20 you are adding an extra 20 empty rows to be unnecessarily checked so, since your last row is a note, what you need is lastrow-1.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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