+ Reply to Thread
Results 1 to 8 of 8

Macro to hide rows where Column C contains any text or value

  1. #1
    Registered User
    Join Date
    03-13-2015
    Location
    Kerry, Ireland
    MS-Off Ver
    2013
    Posts
    9

    Macro to hide rows where Column C contains any text or value

    Hi guys,

    I need some help, I need to create a Macro for work to hide all rows where there is content in Column C. Can you help me?

    Regards,
    ExcelMikeMcC
    Last edited by ExcelMikeMcC; 03-13-2015 at 08:53 AM.

  2. #2
    Registered User
    Join Date
    09-27-2011
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    86

    Re: Macro to hide rows where Column C contains text

    Hi Mike,

    In the below code change the sheet name as per your requirement.
    Please Login or Register  to view this content.
    regards,
    lokicl

    Remember To Do the Following....

    1. Use code tags. Place
    Please Login or Register  to view this content.
    after the last line of code.
    2. Thank those who have helped you by clicking the Star * below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Macro to hide rows where Column C contains text

    Hi,
    Welcome to the forum.

    You thread title and the description don't complement each other.
    Please be specific in the description about what exactly the col. C contains.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    03-13-2015
    Location
    Kerry, Ireland
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro to hide rows where Column C contains text

    Hi Guys,
    I'm still stuck and new to this scripting on Excel. Could you give me a step by step way of how to enter the required script for hiding rows where column c has any value or text for excel 2013.

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Macro to hide rows where Column C contains any text or value

    Try this.......
    Please Login or Register  to view this content.

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Macro to hide rows where Column C contains any text or value

    Thanks for the feedback.

    If that takes care of your original question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.

  7. #7
    Registered User
    Join Date
    03-13-2015
    Location
    Kerry, Ireland
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro to hide rows where Column C contains any text or value

    SKtneer,

    Thank you for the great advice, it works really well, the final issue I have is combining it with another Macro I have recorded to format the data in a way that it can be easily read and analysed. I have no issue creating the "formatting macro", I use the record macro function. I do have an use with combining it with the "hide rows" macro so that all of the formatting can be carried out over one keystroke shortcut.

    ExcelMikeMcC

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to hide rows where Column C contains any text or value

    Hi,

    Please upload the workbook that contains your macro and the macro given in #5 and in a narrative form describe what the formatting should achieve and what rules drive the formatting.

    In practice you probably don't need a macro to format stuff since the standard conditional formatting functionality is often sufficient, but no doubt your formatting explanation will determine this.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. [SOLVED] Macro to Consolidate workbooks containing empty rows in between and excluding a column
    By retrospikz in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-17-2013, 01:28 AM
  2. Macro to add column header text in the first empty column
    By pjkitty in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-03-2012, 07:53 AM
  3. Replies: 2
    Last Post: 09-07-2012, 12:34 PM
  4. How to Import two consecutive text files in same column. No empty rows between.
    By zeroJames in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2011, 03:44 PM
  5. [SOLVED] how insert same text in empty cells in column (10000 rows)
    By bromptongadgets in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-11-2005, 11:15 AM

Tags for this Thread

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