+ Reply to Thread
Results 1 to 7 of 7

Change Row Height in Specific Range Based on Multiple Criteria

  1. #1
    Registered User
    Join Date
    08-25-2019
    Location
    New York
    MS-Off Ver
    Office 13
    Posts
    9

    Change Row Height in Specific Range Based on Multiple Criteria

    Hi,

    I have attached a sample spreadsheet. I have a report that is copy and pasted from another system and I am trying to write a macro to clean up the formatting and make it easier to read and print. I am trying to change the row height to 1.5 in any row where all the cells in the selected range are blank. There are two columns off to the right that have formulas so I am unable to use the Select blanks, entire row codes that I found when I was researching.

    Thank you.

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Change Row Height in Specific Range Based on Multiple Criteria

    See if this works for you

    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,529

    Re: Change Row Height in Specific Range Based on Multiple Criteria

    Is it what you want ???
    Please Login or Register  to view this content.
    If you want to check from column A to F use For J = 1 To 6
    Last edited by PCI; 11-13-2019 at 04:48 PM.
    - Battle without fear gives no glory - Just try

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,529

    Re: Change Row Height in Specific Range Based on Multiple Criteria

    Anther one for the fun
    Please Login or Register  to view this content.
    BTW
    if you want to check from column A to F use Rg.Resize(1, 6)
    Last edited by PCI; 11-15-2019 at 03:25 AM. Reason: Typo

  5. #5
    Registered User
    Join Date
    08-25-2019
    Location
    New York
    MS-Off Ver
    Office 13
    Posts
    9

    Re: Change Row Height in Specific Range Based on Multiple Criteria

    Quote Originally Posted by PCI View Post
    Is it what you want ???
    Please Login or Register  to view this content.
    If you want to check from column A to F use For J = 1 To 6
    Perfect. Thank you for the note--I had a much larger range than my example and adapted it accordingly.

    JLGWhiz - Thank you for the code as well. It mostly did what I needed it to, but it caused the title rows to be minimized as well. I am not 100% on what the code does, but I think it is using a number (sum 0) to identify the rows, but rows with all text don't have any numbers and therefore are minimized.

  6. #6
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Change Row Height in Specific Range Based on Multiple Criteria

    JLGWhiz - Thank you for the code as well. It mostly did what I needed it to, but it caused the title rows to be minimized as well. I am not 100% on what the code does, but I think it is using a number (sum 0) to identify the rows, but rows with all text don't have any numbers and therefore are minimized.
    That is exactly correct. The title row can be omitted by the range parameters of the loop. I was just basing it on the sample file provided.

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,529

    Re: Change Row Height in Specific Range Based on Multiple Criteria

    Super
    Enjoy EXCEL

+ 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: 8
    Last Post: 07-26-2017, 07:53 PM
  2. How do i change the text in a specific cell based off of criteria in another
    By DCrofty in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2016, 01:20 PM
  3. Protect Range from change based on specific Date on another Range
    By mokht in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2015, 09:40 AM
  4. [SOLVED] Copy range based on specific criteria
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 07-03-2014, 05:06 PM
  5. [SOLVED] Dynamic repeating order that needs to change based on specific criteria
    By rcoope02 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-14-2013, 11:30 AM
  6. [SOLVED] Counting Occurences in a Range based on Specific Criteria
    By artikyulashun in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-24-2012, 12:23 PM
  7. macro to change row height based on criteria in row above
    By Axild in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-30-2009, 10:50 PM

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