Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Lovely people, I'm having trouble using VBA to move activecell. For example, i'm using a search macro to find a keyword on m worksheet, and then i want it to: Activecell to go down 4 rows, and right 1 column. (ie. from A41 to B4 (but can't use cells as they will change)) Select an area 24 rows down, and 2 columns across (ie. B45:C69) an copy it onto the clip board. I think i could do the rest now.. Any help would be very appreciated, thank you -- druce ----------------------------------------------------------------------- drucey's Profile: http://www.excelforum.com/member.php...fo&userid=3255 View this thread: http://www.excelforum.com/showthread.php?threadid=53449 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Given FIND ia at activecell:
Dim rng as range Set rng = ActiveCell.Offset(4, 1).Resize(24, 2) MsgBox rng.Address Rng.copy ..... 24 rows, 2 columns from B45 will be B45:C68 not B45:C69 HTH "drucey" wrote: Lovely people, I'm having trouble using VBA to move activecell. For example, i'm using a search macro to find a keyword on my worksheet, and then i want it to: Activecell to go down 4 rows, and right 1 column. (ie. from A41 to B45 (but can't use cells as they will change)) Select an area 24 rows down, and 2 columns across (ie. B45:C69) and copy it onto the clip board. I think i could do the rest now.. Any help would be very appreciated, thank you! -- drucey ------------------------------------------------------------------------ drucey's Profile: http://www.excelforum.com/member.php...o&userid=32553 View this thread: http://www.excelforum.com/showthread...hreadid=534493 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Amazing! Thank you so much -- drucey ------------------------------------------------------------------------ drucey's Profile: http://www.excelforum.com/member.php...o&userid=32553 View this thread: http://www.excelforum.com/showthread...hreadid=534493 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Ah, figured out the moving around bit - ActiveCell.Offset(4,1).Select :) i'm so pleased with myself Now just the selecting ... -- drucey ------------------------------------------------------------------------ drucey's Profile: http://www.excelforum.com/member.php...o&userid=32553 View this thread: http://www.excelforum.com/showthread...hreadid=534493 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Glad you've worked it out (the best learning)... but avoid using SELECTS if
you can as they are inefficient! "drucey" wrote: Ah, figured out the moving around bit - ActiveCell.Offset(4,1).Select :) i'm so pleased with myself Now just the selecting ... -- drucey ------------------------------------------------------------------------ drucey's Profile: http://www.excelforum.com/member.php...o&userid=32553 View this thread: http://www.excelforum.com/showthread...hreadid=534493 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Arrow keys moving whole excel sprdsht insted of from cell to cell | New Users to Excel | |||
Moving cell contents to new cell loses background color in old cel | Excel Discussion (Misc queries) | |||
Arrows not moving from cell to cell, when I push arrow columns m | Excel Discussion (Misc queries) | |||
Arrow keys move screen instead of moving from cell to cell. | Setting up and Configuration of Excel | |||
How to copy formatting when moving from cell to variable to another cell on another worksheet | Excel Programming |