+ Reply to Thread
Results 1 to 4 of 4

Array/Loop to Delete Rows?

  1. #1
    Registered User
    Join Date
    04-24-2007
    Posts
    7

    Array/Loop to Delete Rows?

    Basically I have a little of an idea how to code this but I know it doesn't work, I have this spreadsheet, I want it to follow the logic of:

    If column F = "$0.00" and column D = "$0.00" then
    delete the corresponding row
    else

    I can image it looking something like (which is completely wrong):
    Please Login or Register  to view this content.
    I could code it line by line for like 1000 lines, though seems a bit tedious, if anyone can help, thanks,

    - Alex
    Last edited by VBA Noob; 04-24-2007 at 03:38 PM.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    Here ya go:

    Please Login or Register  to view this content.
    dave

  3. #3
    Registered User
    Join Date
    04-24-2007
    Posts
    7
    Thanks, I just tried this code and it doesn't seem to be working.

    I put it in this macro, then ran the macro it doesn't give me any errors, but the sheet looks to be the same. I made sure that the corresponding values in column D and F are "0" (without the quotes) as well, as opposed to $0.00.

    Oh also, I changed your "o" to "0" and it didn't work also.

  4. #4
    Registered User
    Join Date
    04-24-2007
    Posts
    7
    Oh, also your code I tried on just the second line and it deleted the entire column, I wanted it to delete the row corresponding to the column that shows 0 for F2 and D2, F3 and D3, etc... sorry for the misunderstanding.

    Please Login or Register  to view this content.
    If anyone can help, thanks,

+ 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