+ Reply to Thread
Results 1 to 6 of 6

Set Cell Height and Width based on size of a Range of cells

  1. #1
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Set Cell Height and Width based on size of a Range of cells

    I'm trying to a cell height and Width based on the combined total of a Range of Cells.

    Example here, I am trying to add up the height and width of the cells I3 to O9. And then set a cell height width on another sheet that equals that combined height and width.

    I'm close with the below, but can't figure out the conversion from the pixels to compute it correctly

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,543

    Re: Set Cell Height and Width based on size of a Range of cells

    Use the Left of the Column adjacent to the right and subtract the Left of the leftmost column.
    Same for the Rows
    Experience trumps academics every day of the week and twice on Sunday.

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,543

    Re: Set Cell Height and Width based on size of a Range of cells

    Let the computer do the calculating.
    Please Login or Register  to view this content.
    Change the references as required.
    Last edited by jolivanes; 09-26-2022 at 02:59 PM. Reason: Added info

  4. #4
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Re: Set Cell Height and Width based on size of a Range of cells

    That's perfect!!

    Thanks!!

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,543

    Re: Set Cell Height and Width based on size of a Range of cells

    Thanks for the update.
    Good Luck

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,543

    Re: Set Cell Height and Width based on size of a Range of cells

    This might be easier to adapt for different scenarios.
    Again, change references as required.
    Please Login or Register  to view this content.
    It'll only gives the right result if all columns within the range are the same width. Same for the rows.

+ 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. Change cell value based on height and width of row
    By bari3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2021, 02:19 AM
  2. [SOLVED] Excel Macro - Shape size desired not corresponding to correct Height and Width
    By PadawanCoder in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2020, 05:10 PM
  3. Change Cell Width/Height for certain range
    By lborja in forum Excel General
    Replies: 0
    Last Post: 02-09-2016, 05:35 PM
  4. Select Range based on offset with (row,column,height,width)
    By incjourn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-29-2011, 08:41 AM
  5. Replies: 8
    Last Post: 10-26-2009, 09:46 AM
  6. Seeking Help with Cell/Range Height and Width Properties
    By Joseph Geretz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2006, 03:10 PM
  7. Replies: 1
    Last Post: 04-13-2005, 07:06 PM

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