Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have the following macro (simplified, of course):
================== Sub Macro1() Macro1 Macro Keyboard Shortcut: Ctrl+s Range("A1:a15").Select Selection.Copy End Sub ==================== I would like to substitute a formula (match("the end",A1:a100)) for the "a15", but can't find the correct syntax. Can anyone help? Thanks. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Is this what you mean lastrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row Range("A1:a" & lastrow).Select -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Al @ Frontier" wrote: I have the following macro (simplified, of course): ================== Sub Macro1() Macro1 Macro Keyboard Shortcut: Ctrl+s Range("A1:a15").Select Selection.Copy End Sub ==================== I would like to substitute a formula (match("the end",A1:a100)) for the "a15", but can't find the correct syntax. Can anyone help? Thanks. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Al -
Substitute your range statement for these two: Range("A1").Select Range(Selection, Selection.End(xlDown)).Select -- Daryl S "Al @ Frontier" wrote: I have the following macro (simplified, of course): ================== Sub Macro1() Macro1 Macro Keyboard Shortcut: Ctrl+s Range("A1:a15").Select Selection.Copy End Sub ==================== I would like to substitute a formula (match("the end",A1:a100)) for the "a15", but can't find the correct syntax. Can anyone help? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula Macro | Excel Discussion (Misc queries) | |||
Macro Formula for Max value | Excel Worksheet Functions | |||
Help with a macro/formula | Excel Worksheet Functions | |||
Macro and Formula | Excel Worksheet Functions | |||
how to run a macro from a formula? | Excel Discussion (Misc queries) |