glophillips1
asked on
Auto set every other row height in large spreadsheet
I have excel sheet that has 1000 rows and I want to format every other row to a different height? Can I do this with an "If" statement? I know there has to be a way to accomplish this just not sure how.
Thanks,
G
Thanks,
G
ASKER
Duncan,
I tried that and nothing happens when I select Auto Fit Row Height. What am I doing wrong?
Gloria
I tried that and nothing happens when I select Auto Fit Row Height. What am I doing wrong?
Gloria
it should be okay if you are using Excel 2010 above excel 2007
You can not find tab or you've other issue ? please advise
Duncan
You can not find tab or you've other issue ? please advise
Duncan
Is this what you are looking for? You can add this to the Sheet code you would like to adjust the row heights on.
Sub SetRowHeights()
Dim i As Integer
For i = 1 To Range("A1048576").End(xlUp).Row
If i Mod 2 = 0 Then Rows(i).RowHeight = 25
Next i
End Sub
I found this arcitle for similar issue for Excel 10 at yahoo site
http://voices.yahoo.com/how-auto-fit-column-width-row-height-in-12467758.html
http://voices.yahoo.com/how-auto-fit-column-width-row-height-in-12467758.html
ASKER
Duncan,
Okay, I go to Home, Format, then AutoFit Row Height in Excel 2010. When I select AutoFIt Row Height nothing happens. Am I in the right place?
Gloria
Okay, I go to Home, Format, then AutoFit Row Height in Excel 2010. When I select AutoFIt Row Height nothing happens. Am I in the right place?
Gloria
Could you capture your excel image to us ?
Duncan
Duncan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I want even number rows to be 19.5 in height and the odd number to be at the default. I have all rows mared with a mod function so they are either a 1 (odd) or 0 for even. I think Famousmortimer your suggestion will work but I don't know how to get to that point. Can you help.
Thanks,
Gloria
Thanks,
Gloria
ASKER
This worked great!!
Click the Menus tab;
Click Format drop down menu;
Click Row item;
Then you will view the AutoFit Row Height item staying in the sub-item list of Row item. The Auto Fit Row Height is the right thing we are looking for.
Duncan