+ Reply to Thread
Results 1 to 6 of 6

How to use a macro to remove rows whose values in column A equal to blank spaces?

  1. #1
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    How to use a macro to remove rows whose values in column A equal to blank spaces?

    Hi, I have a question which may be easy for your guys, but very useful to my case.

    As a short example. There are three sheets in the file: S1, S2, S3. For each sheet, the column A has formulas. The goal is, for each sheet, to delete all rows whose values in column A is equal to blank spaces.

    I attached the example here. For example, in sheet S1, only keep the first 5 rows with numbers in column A, and all other rows can be deleted.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: How to use a macro to remove rows whose values in column A equal to blank spaces?

    Soemthing like

    Please Login or Register  to view this content.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How to use a macro to remove rows whose values in column A equal to blank spaces?

    Try:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to use a macro to remove rows whose values in column A equal to blank spaces?

    Try the attached.
    Attached Files Attached Files

  5. #5
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: How to use a macro to remove rows whose values in column A equal to blank spaces?

    Hi billij..
    the problem is that...
    we can refer the whole column...
    as It will result in infinite loop...
    give use some limited range.. which we can refer..


    Don't forget to click *

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: How to use a macro to remove rows whose values in column A equal to blank spaces?

    Another:

    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. Replies: 5
    Last Post: 06-12-2014, 02:48 PM
  2. Replies: 8
    Last Post: 02-13-2014, 11:30 AM
  3. [SOLVED] Macro to remove rows with zero values in a column
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 34
    Last Post: 11-13-2013, 11:50 AM
  4. [SOLVED] Macro to insert blank rows so that the total number of rows with data is equal to 1021
    By nsm1411 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-07-2013, 10:25 AM
  5. How to remove leading blank spaces in front of any word in column
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-21-2011, 12:19 AM

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