Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default shift and down keys in macro

Hi,
I want to mark four cells.
How can I write shift+down+down+down in a macro.
(Then I say copy paste etc).
Thanks
Cousin Excel
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default shift and down keys in macro

Activecell.Resize(4).Select
Activecell.Resize(4).Copy

OR starting from cell A1 copy 4 cells to the same sheet cell J1

Range("A1").Resize(4).Copy Range("J1")

--
Jacob


"CousinExcel" wrote:

Hi,
I want to mark four cells.
How can I write shift+down+down+down in a macro.
(Then I say copy paste etc).
Thanks
Cousin Excel

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default shift and down keys in macro

Hi and thank you Jacob Skaria.
This was something new for me and thank you.
I still need to use shift and down keys.
I hope shift and down keys will solve my probem. There are filtered cells
and when I say things other than shift and down keys it is copying hidden
(filtered away) cells I believe but I need to copy only four cells I see on
screen after filtering.

"Jacob Skaria" wrote:

Activecell.Resize(4).Select
Activecell.Resize(4).Copy

OR starting from cell A1 copy 4 cells to the same sheet cell J1

Range("A1").Resize(4).Copy Range("J1")

--
Jacob


"CousinExcel" wrote:

Hi,
I want to mark four cells.
How can I write shift+down+down+down in a macro.
(Then I say copy paste etc).
Thanks
Cousin Excel

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default shift and down keys in macro

This will find the last row in the active column

Sub shiftdowndowndown()
ar = ActiveCell.Row
ac = ActiveCell.Column
'MsgBox ac
lr = Cells(Rows.Count, ac).End(xlUp).Row
'MsgBox lr
Cells(ar, ac).Resize(lr).Copy
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"CousinExcel" wrote in message
...
Hi,
I want to mark four cells.
How can I write shift+down+down+down in a macro.
(Then I say copy paste etc).
Thanks
Cousin Excel


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
Macro to shift Unique713 Excel Discussion (Misc queries) 3 December 18th 08 08:59 PM
Macro to shift to next row Unique713 Excel Worksheet Functions 2 November 25th 08 05:51 PM
how to use shift and down arrow keys in a macro? John W Excel Worksheet Functions 1 July 31st 05 01:21 AM
In Word the shortcut keys to change from UC to LC is shift F3.... jdtrkohler Excel Discussion (Misc queries) 1 April 6th 05 03:41 PM
I cannot extend cells using Shift+arrow keys; I cannot Autosum KangaFrank Excel Worksheet Functions 2 March 8th 05 03:30 AM


All times are GMT +1. The time now is 05:57 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"