LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default AUTO FORMATTING WHEN ADDING ADDITIONAL ROWS

Unfortunately that isn't what you function does. It would use the value in
the last cell entered to determine the extent of the selection - if the
value was a 1 it would select A2:G2. If the value was not numeric, it would
raise an error. I think you meant:

Range("a2").Resize(Selection.End(xlDown).row - 1, 7).Select

--
Regards,
Tom Ogilvy


"cscorp" wrote in
message ...

Dear Sir,

Thry the following:

Range("a2").Resize(Selection.End(xlDown), 7).Select

What it does?

1. Select cell "A2" -- your first cell in the range
2. Expand the range to include the new rows added
"resize(selection.end(xldown),7).
3. Select the new range --" a2:g407"

Please, let me know if that solved your problem.

regards
Juan Carlos


--
cscorp
------------------------------------------------------------------------
cscorp's Profile:

http://www.excelforum.com/member.php...o&userid=24015
View this thread: http://www.excelforum.com/showthread...hreadid=376978



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically adding additional rows Volntyr Excel Discussion (Misc queries) 2 December 5th 09 11:39 AM
Auto extract data & inserts rows additional rows automatically Meeru Excel Discussion (Misc queries) 3 September 9th 09 01:46 PM
Please help with Sumproduct, adding additional criteria Gina[_2_] Excel Worksheet Functions 5 October 1st 08 02:23 PM
How can I keep conditional formatting when adding rows to excel? Excel one tenth guru Excel Discussion (Misc queries) 0 January 10th 07 02:57 PM
Adding additional rows in VBA based on character strings Mike Excel Programming 1 February 8th 05 06:22 PM


All times are GMT +1. The time now is 06:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"