Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Justifying data of varying row numbers

Status
Not open for further replies.

Fiat77

Programmer
Feb 4, 2005
63
US
I have a formula below that works great to justify a group of data if it is exactly 5 rows high. I needed to adjust this formula to say however many rows my mouse has highlighted justify out 23 columns like the rest of the formula says. How can I adjust this so that the rows are not a fixed length but based upon however many I have highlighted? thanks

Application.ActiveCell.Resize(5, 23).Justify
 
Application.ActiveCell.Resize(selection.rows.count, 23).Justify

Rgds, Geoff

Three things are certain. Death, taxes and lost data. DPlank is to blame

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top