View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Office_Novice Office_Novice is offline
external usenet poster
 
Posts: 245
Default Automatically Change Row Height Based on Cell Contents?

.AutoFit Will adjust the cells in the defined range to fit the contents of
the cells in that range

"samcham" wrote:

How will that change the row height?

"Office_Novice" wrote:

Try Columns("B") .AutoFit

"samcham" wrote:

Is there a way to change the row height based on the contents of a cell?

Here's what I've done:

1. I have a worksheet with about 6,000 or so lines, containing data for
over 100 departments.

2. I've created Subtotals, and used Ron DeBruin's code to create separate
worksheets for each department.

3. The subtotals came over to the individual worksheets just fine. Now I
want to change the row height of the rows that contain the subtotals to 25,
so the worksheets are easier to read. Each of the subtotal rows has the word
"Total" included in the entry in column B.

Is there a way to automate this task?

Thanks,

Sam.