Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 478297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:40:39+00:00 2026-05-13T00:40:39+00:00

I am pasting a table into Excel from SAS where the number of rows

  • 0

I am pasting a table into Excel from SAS where the number of rows spanned by the cell in the first column is variable. That is to say sometimes the first column is 3 merged cells, sometimes it is 6, etc. I would like to run a macro that changes the height of the first cell to be 10 merged cells, and to insert rows at the bottom to make space for this.

I’m a little stumped at how to approach this problem. Any assistance would be most appreciated.

Let me try to illustrate. If I wanted the first column to all span 4 rows, I might start with

_________________
      |__________
______|__________
      |__________
      |__________
______|__________

and end up with

_________________
      |__________
      |__________
      |__________
______|__________
      |__________
      |__________
      |__________
______|__________
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T00:40:39+00:00Added an answer on May 13, 2026 at 12:40 am

    Thanks for your explanation. You just made that über tough. The problem is that although it seems you’re just changing the height of your merged cell to be larger, you’re actually creating a new merge in order to make the newly merged cell 4 cells high.

    In your first illustration, you show two merged cells with address ranges of A1:A2 and A3:A6. In your second illustration, the addresses are A1:A4 and A5:A8, respectively.

    In order for Excel to “change the height” (I use that phrase loosely) of the original merged cells at address A1:A2, it actually has to create a new set up merged cells at address range A1:A4. However, you won’t be able to do that because address A3:A6 is already a merged range and these would overlap.

    If you were to try to do this manually, you know that you would have to unmerge the lower group, remerge the top group, and the remerge the bottom group.

    You could write a macro that, when executed, popped up an input box that asked the number of cells high the merged cell should be. However, your code would then have to analyze your original stack of merged cells and then unmerge and remerge everything programatically to make the change. This is certainly possible, but it could be a real pain (but also a fun challenge :).

    I would ask yourself how badly you want to be able to exactly what you’re looking for, because it’s not exactly natural behavior in Excel.


    My original post is below: now obsolete since I now understand what the author is asking

    If you just want to change the height of the cells, you can use something like:

        Rows("1:1").RowHeight = 27.75
    

    However, I’m confused by your reference to merged cells. Are you just trying to change the height of a cell or are you also trying to merge cells together?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to solve copy pasting a column with values from excel into
When passing a date from datepicker to sort an excel table, somewhere the format
I am copying code from website matplotlib and pasting into the Vim editor in
I am trying to copy an excel Table and image from MS EXCEL to
Can anyone please advise the syntax for passing a table FROM a SAS library
I have an excel spreadsheet based on a pivot table that is periodically updated
I have a maddening problem. I have a table that contains rows consisiting of
I've created a trigger manually (By pasting the SQL from another oracle db into
I am trying to insert records into Access table from SQL Server table. For
My table is posting and in that table, it shows all the posting people

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.