+ Reply to Thread
Results 1 to 3 of 3

VBA for multiple rows

  1. #1
    Forum Contributor
    Join Date
    07-01-2009
    Location
    Maine, USA
    MS-Off Ver
    Excel 2016
    Posts
    161

    VBA for multiple rows

    Could someone help with a macro that takes multiple selected rows and...

    1) Takes the first row only, resizes the height so all the contents fit in the row (some cells may have wrap enabled).
    2) Based on the height of the first row, resize all the rows based on (height of 1st row) / (number of selected rows) = (new height for each row).

    I'm thinking for this to happen, I need to reselect only the first row in the selection, do #1, then reselect all the rows again and do #2. All I have so far is this.

    Please Login or Register  to view this content.

    Thank you!

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: VBA for multiple rows

    This is what I came up with.
    Please Login or Register  to view this content.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    07-01-2009
    Location
    Maine, USA
    MS-Off Ver
    Excel 2016
    Posts
    161

    Re: VBA for multiple rows

    Your script worked perfectly! It showed me that what I was trying to do wouldn't work and why! Thank you!

+ 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] Lookup multiple criteria in multiple columns in multiple rows; return true if exists
    By ufdlim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-07-2019, 02:03 PM
  2. Date Stamp within Excel table - Changes in multiple rows and columns and new rows added
    By jarheadmctavish in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-09-2016, 03:22 PM
  3. Search Multiple Columns and Rows - Show results in Multiple columns and rows
    By heykeighley in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 08-12-2015, 10:16 AM
  4. Return Multiple Values with multiple rows & multiple columns
    By sachin parab in forum Excel General
    Replies: 2
    Last Post: 11-05-2012, 10:21 AM
  5. Multiple ccolums/rows to get data from multiple columns/rows (vlookup)
    By Ramzes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-18-2010, 05:35 AM
  6. Replies: 1
    Last Post: 05-18-2009, 11:21 AM
  7. Replies: 1
    Last Post: 03-18-2009, 04:18 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