Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default moving columns and selecting for copying


Hi,

Excel 97
I have a macro attached to a button that copies previously marked data
from a
web page to cell D8 on a tempory download sheet, where it is formatted
and then copied to another sheet.

Sub DownloadTABdata()
'
' DownloadTABdata Macro
' Macro recorded 1/06/05 by IBM
'
ActiveSheet.PasteSpecial Format:="Text", Link:=False,
DisplayAsIcon:= _
False


End Sub

Now the data arrives with a list of numbers in col D8:Dxx and names in
col F8:Fxx. I want to move the data in F8:Fxx to E8:Exx. The data
range is variable from , say, 6 to 24 items.

After the column move, I want that range (D8:Exx) marked ready for
copying on to another sheet.

Can anyone help with a bit of code to accomplish this task?

Thanks,
Neddy


--
Neddy
------------------------------------------------------------------------
Neddy's Profile: http://www.excelforum.com/member.php...o&userid=24345
View this thread: http://www.excelforum.com/showthread...hreadid=379455

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default moving columns and selecting for copying

Assuming the data is contiguous from F8 downward the cut and paste code
would look like this:

Range("F8", Range("F8").End(xlDown)).Cut Range("E8")

--
Jim
"Neddy" wrote in
message ...
|
| Hi,
|
| Excel 97
| I have a macro attached to a button that copies previously marked data
| from a
| web page to cell D8 on a tempory download sheet, where it is formatted
| and then copied to another sheet.
|
| Sub DownloadTABdata()
| '
| ' DownloadTABdata Macro
| ' Macro recorded 1/06/05 by IBM
| '
| ActiveSheet.PasteSpecial Format:="Text", Link:=False,
| DisplayAsIcon:= _
| False
|
|
| End Sub
|
| Now the data arrives with a list of numbers in col D8:Dxx and names in
| col F8:Fxx. I want to move the data in F8:Fxx to E8:Exx. The data
| range is variable from , say, 6 to 24 items.
|
| After the column move, I want that range (D8:Exx) marked ready for
| copying on to another sheet.
|
| Can anyone help with a bit of code to accomplish this task?
|
| Thanks,
| Neddy
|
|
| --
| Neddy
| ------------------------------------------------------------------------
| Neddy's Profile:
http://www.excelforum.com/member.php...o&userid=24345
| View this thread: http://www.excelforum.com/showthread...hreadid=379455
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default moving columns and selecting for copying


Thanks Jim,

Now to mark the new range(D8:Exx) ready to copy, I suppose I would use
a variation of that last statement to mark it?

thanks
Neddy


--
Neddy
------------------------------------------------------------------------
Neddy's Profile: http://www.excelforum.com/member.php...o&userid=24345
View this thread: http://www.excelforum.com/showthread...hreadid=379455

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default moving columns and selecting for copying

Sorry but I don't know what "to mark" means.

--
Jim
"Neddy" wrote in message
...
|
| Thanks Jim,
|
| Now to mark the new range(D8:Exx) ready to copy, I suppose I would use
| a variation of that last statement to mark it?
|
| thanks
| Neddy
|
|
| --
| Neddy
| ------------------------------------------------------------------------
| Neddy's Profile:
http://www.excelforum.com/member.php...o&userid=24345
| View this thread: http://www.excelforum.com/showthread...hreadid=379455
|


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default moving columns and selecting for copying


Jim,

Thanks for your help. Marking is the same as selecting the range tha
contains
the data.

When doing it manually, using the cursor will "mark" the range, and th
copy command will put the flashing line around the selection.

I was wondering if a macro could be used to select the range D8:Ex
that was
created by the last statement and somehow invoke the copy comman
without
it actually copying. I have to then move to the other sheet an
manually use the
paste button.


Hope that makes sense :)


Thanks
Nedd

--
Nedd
-----------------------------------------------------------------------
Neddy's Profile: http://www.excelforum.com/member.php...fo&userid=2434
View this thread: http://www.excelforum.com/showthread.php?threadid=37945



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default moving columns and selecting for copying

I think you want something like this:

Range("F8", Range("F8").End(xlDown)).Cut Range("E8")
Range("D8", Range("D8").End(xlDown)).Resize(, 2).Copy


--
Jim
"Neddy" wrote in message
...
|
| Jim,
|
| Thanks for your help. Marking is the same as selecting the range that
| contains
| the data.
|
| When doing it manually, using the cursor will "mark" the range, and the
| copy command will put the flashing line around the selection.
|
| I was wondering if a macro could be used to select the range D8:Exx
| that was
| created by the last statement and somehow invoke the copy command
| without
| it actually copying. I have to then move to the other sheet and
| manually use the
| paste button.
|
|
| Hope that makes sense :)
|
|
| Thanks
| Neddy
|
|
| --
| Neddy
| ------------------------------------------------------------------------
| Neddy's Profile:
http://www.excelforum.com/member.php...o&userid=24345
| View this thread: http://www.excelforum.com/showthread...hreadid=379455
|


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 and copying from a list shennigan Excel Discussion (Misc queries) 2 November 14th 08 02:14 PM
Moving/Copying Worksheets Teacher Excel Discussion (Misc queries) 4 February 1st 08 01:31 PM
Selecting and moving chart(s) within a worksheet using keyboard ke xppuser Charts and Charting in Excel 1 February 28th 06 11:38 AM
Moving cursor to another cell w/out selecting entire area Darin Excel Discussion (Misc queries) 8 May 13th 05 08:44 PM
Copying Formatting Without Selecting Dan Gesshel Excel Programming 0 August 20th 03 01:12 AM


All times are GMT +1. The time now is 01:32 PM.

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"