+ Reply to Thread
Results 1 to 5 of 5

Few macro issues

  1. #1
    Registered User
    Join Date
    07-04-2008
    Location
    Iceland
    Posts
    8

    Few macro issues

    Okay guys I need some help now. I'm building my first ever macro in excel and I have 2 maybe 3 issues.

    I put out a post earlier today : Link : where I was asking for help, I did not get any responses, but that is no problem cus I figured out how to handle it, at least mostly. But now let's get to the problems.

    I will attach the excel sheet so you can take a look at the macro.

    What : My delete all empty rows thing is not working like is should
    Please Login or Register  to view this content.
    Question: How can I make it delete all empty lines?
    Thx for all the help.

    Davíð.
    Attached Files Attached Files
    Last edited by Abattage; 07-22-2008 at 06:42 AM.

  2. #2
    Forum Contributor Stuie's Avatar
    Join Date
    09-17-2006
    Location
    Suffolk, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    432
    one thing to remember is when you delete a row it shifts up so,

    when i delete row 32, row 33 is now row 32 and my loop doesnt know that and goes to row 33.

    so if you have two blank rows one after the other the second row will be missed and not deleted

  3. #3
    Registered User
    Join Date
    06-16-2008
    Posts
    32
    If it's enough just to hide them, you could do

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    06-02-2005
    Location
    India
    MS-Off Ver
    2007
    Posts
    138
    The above code deletes empty rows based on column-A and works perfect for me.

    Please change your below code if your column criteria is different...
    row_count = Cells(Rows.Count, "a").End(xlUp).Row
    Change letter "a" to your column letter to take effect.




    ...

  5. #5
    Registered User
    Join Date
    07-04-2008
    Location
    Iceland
    Posts
    8

    Question

    Thx for the help so far but is there anyway to just get excel to hide/dlt all empty rows with macro.

    So it just says: Is there is nothing in the hole row down to row 40 then dlt them ?. That is the code I'm looking for, cus with the code I have I only dlt a part of what I want to dlt.

    Also I'm looking for a code to do one thing. "If there is a X in !Verðbanki(W8:W14) then replace it with 1" and then in the end of the macro, "If there is a 1 in !Verðbanki(W8:W14) then replace it with X".

    If anyone would be so kind to put in code for that or a hint it would be great.

    Thx again
    Last edited by Abattage; 07-22-2008 at 10:09 AM.

+ 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