ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how to use shift and down arrow keys in a macro? (https://www.excelbanter.com/excel-worksheet-functions/37912-how-use-shift-down-arrow-keys-macro.html)

John W

how to use shift and down arrow keys in a macro?
 
Using Excel 2003, I have a macro that does everything except for holding down
the shift key and using the down arrow key.

I need to copy three rows, C5:C7. Starting in C5, the macro needs to SHIFT,
DOWN DOWN to highlight the three cells so they can be copied. (I cant use
end-down because C6 & C7 may be blank.)

Can you show me an example of how the SHIFT command and the DOWN command
should be written into my macro?

Thank you very much,

John


David McRitchie

Hi John,
If you recorded a macro, you would then have your example.
If you want something even a little different that the absolute references
then you would need to modify the macro.
.http://www.mvps.org/dmcritchie/excel/getstarted.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"John W" <John wrote in message ...
Using Excel 2003, I have a macro that does everything except for holding down
the shift key and using the down arrow key.

I need to copy three rows, C5:C7. Starting in C5, the macro needs to SHIFT,
DOWN DOWN to highlight the three cells so they can be copied. (I can't use
end-down because C6 & C7 may be blank.)

Can you show me an example of how the SHIFT command and the DOWN command
should be written into my macro?

Thank you very much,

John





All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com