Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by glophillips1
at 2024-07-30 09:15:15
Point:500 Replies:10 POST_ID:829172USER_ID:12064
Topic:
Office & Productivity Software;Microsoft Office Suite;Microsoft Excel Spreadsheet Software
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
Author: glophillips1 replied at 2024-07-30 10:35:36
This worked great!!
Author: glophillips1 replied at 2024-07-30 10:31:05
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
Accepted Solution
Expert: Glenn Ray replied at 2024-07-30 10:26:41
500 points EXCELLENT
FamousMortimer's solution works and is fast (although, one only needs to adjust rows up to 1000, not the end of the sheet).
There is no Excel function available that will control row height. However, one could add a helper column to identify the rows to be adjusted and then filter and adjust accordingly.
To do it manually:
1) Add or insert a helper column. This can be deleted later.
2) In this helper column, go to the first row to be adjusted and enter the following formula:
=MOD(ROW(),2)
Note the result; it will either be 0 or 1.
3) Copy this formula down to row 1000 (or however many rows you need).
4) Turn on data filters and filter on the value (0 or 1) that is for the rows you want to adjust the height.
You should only see every other row.
5) Select all the visible, filtered rows.
6) Change the row height:
a) Right-click on any row header
b) Select "Row height..."
c) Enter the new height
7) Turn off the filtering
8) Delete or hide the helper column (optional)
I've attached an example file that demonstrates this.
Regards,
-Glenn
There is no Excel function available that will control row height. However, one could add a helper column to identify the rows to be adjusted and then filter and adjust accordingly.
To do it manually:
1) Add or insert a helper column. This can be deleted later.
2) In this helper column, go to the first row to be adjusted and enter the following formula:
=MOD(ROW(),2)
Note the result; it will either be 0 or 1.
3) Copy this formula down to row 1000 (or however many rows you need).
4) Turn on data filters and filter on the value (0 or 1) that is for the rows you want to adjust the height.
You should only see every other row.
5) Select all the visible, filtered rows.
6) Change the row height:
a) Right-click on any row header
b) Select "Row height..."
c) Enter the new height
7) Turn off the filtering
8) Delete or hide the helper column (optional)
I've attached an example file that demonstrates this.
Regards,
-Glenn
Expert: duncanb7 replied at 2024-07-30 09:45:45
Could you capture your excel image to us ?
Duncan
Duncan
Author: glophillips1 replied at 2024-07-30 09:44:00
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
Expert: duncanb7 replied at 2024-07-30 09:42:08
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
Expert: FamousMortimer replied at 2024-07-30 09:40:02
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 iEnd Sub 1:2:3:4:5:6:7:
Expert: duncanb7 replied at 2024-07-30 09:36:20
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
Author: glophillips1 replied at 2024-07-30 09:34:55
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
Expert: duncanb7 replied at 2024-07-30 09:19:27
Just follow the instruction as follows
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
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