Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting and copying from a list | Excel Discussion (Misc queries) | |||
Moving/Copying Worksheets | Excel Discussion (Misc queries) | |||
Selecting and moving chart(s) within a worksheet using keyboard ke | Charts and Charting in Excel | |||
Moving cursor to another cell w/out selecting entire area | Excel Discussion (Misc queries) | |||
Copying Formatting Without Selecting | Excel Programming |