Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default selecting a range

I am trying to select a range in column B and then have
the information cut, and pasted into column A at the
bottom of the information in column A. How can this be
done simply?

Thanks,
David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default selecting a range

Try this, maybe not the best but it works

I asume you have the range selected:

Sub test()
Selection.Cut
Cells(Range("A65000").End(xlUp).Row + 1, 1).Paste
ActiveSheet.Paste
End Sub

Regards,

John

-----Original Message-----
I am trying to select a range in column B and then have
the information cut, and pasted into column A at the
bottom of the information in column A. How can this be
done simply?

Thanks,
David
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default selecting a range

try the following

Sub CopySelection()
If Selection.Rows.Count < Rows.Count - Range("B" &
Rows.Count).End(xlUp).Row Then
Selection.Copy
Range("B" & Rows.Count).End(xlUp).PasteSpecial
Else
MsgBox "Cannot paste selection - not enough rows"
End If
End Sub

very easy to change this to an addin to you can have it as a button on
toolbar for all spreadsheets - let me know if u need this.


Reply
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
selecting a range Garth Excel Discussion (Misc queries) 2 March 4th 09 08:40 PM
Please help with selecting a range keri Excel Discussion (Misc queries) 7 December 12th 06 08:56 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Selecting a Range SJT Excel Discussion (Misc queries) 2 March 8th 06 07:30 PM
Selecting a Worksheet Range Coolboy55 Excel Worksheet Functions 6 August 23rd 05 03:57 PM


All times are GMT +1. The time now is 04:57 AM.

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

About Us

"It's about Microsoft Excel"