+ Reply to Thread
Results 1 to 7 of 7

Deleting a Row

  1. #1
    Forum Contributor
    Join Date
    11-19-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    137

    Deleting a Row

    I want to delete a row based on two values in that row.

    If column C has a value of Black and column F has a value of Billing Qty I want that row to be deleted.



    Thanks for any help!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Deleting a Row

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    11-19-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    137

    Re: Deleting a Row

    Quote Originally Posted by 6StringJazzer View Post
    Please Login or Register  to view this content.
    I get Runtime error 1004 on If Cells(R, "C") = "Black" And Cells(R, "F") = "Billing Qty" Then

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Deleting a Row

    6StringJazzer put in comment to "Set R to row of interest"... so you need to assign a value to R before the If statement
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Deleting a Row

    Also, this code is intended to be located in the sheet you are working on. If you put it in a generic module, it will default to ActiveSheet.

    I have a feeling there is a lot of detail you haven't told us, so obviously I couldn't give you a detailed, ready-to-wear answer. For example, do you need to do this in a loop?

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: Deleting a Row

    @6StringJazzer
    What happened to your crystal ball?

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Deleting a Row

    Quote Originally Posted by jolivanes View Post
    @6StringJazzer
    What happened to your crystal ball?
    Some days the crystal is cloudy.....

+ 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. Replies: 1
    Last Post: 10-09-2015, 09:19 AM
  2. [SOLVED] Deleting part of a column without deleting whole rows.
    By dstrdOne in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2013, 11:42 AM
  3. Deleting Raw Data = Deleting Pivot Tables?
    By taltalk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-10-2008, 07:41 AM
  4. Replies: 6
    Last Post: 08-29-2006, 03:52 PM
  5. [SOLVED] deleting values in a worksheet without deleting the formulas
    By patti in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-28-2005, 05:05 PM
  6. how prevent formula in cell from deleting when deleting value????
    By sh-boom in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 09-30-2005, 02:05 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