Prev: Hiding menu options
Next: Copy Filtered Data
From: Munchkin on 25 Mar 2010 10:20 I want my macro to select J7, go to the record end, then go across to the next cell, which is empty. As you can see when I recorded my macro it referenced a specific cell instead (K751). Hope I explained clearly - thanks in advance for help. Range("J7").Select Selection.End(xlDown).Select Range("K751").Select
From: Bob Phillips on 25 Mar 2010 10:30 Try Range("J5").End(xlDown).Offset(0, 1).Select -- HTH Bob "Munchkin" <Munchkin(a)discussions.microsoft.com> wrote in message news:2797FBC0-4A7C-4188-8624-F74472ADC69E(a)microsoft.com... >I want my macro to select J7, go to the record end, then go across to the > next cell, which is empty. As you can see when I recorded my macro it > referenced a specific cell instead (K751). Hope I explained clearly - > thanks > in advance for help. > > Range("J7").Select > Selection.End(xlDown).Select > Range("K751").Select >
From: Jacob Skaria on 25 Mar 2010 10:36 Try this Range("J7").End(xlDown).Offset(1).Select OR if you have blank cells in between try the below..... Cells(Rows.Count, "J").End(xlUp).Offset(1).Select -- Jacob "Munchkin" wrote: > I want my macro to select J7, go to the record end, then go across to the > next cell, which is empty. As you can see when I recorded my macro it > referenced a specific cell instead (K751). Hope I explained clearly - thanks > in advance for help. > > Range("J7").Select > Selection.End(xlDown).Select > Range("K751").Select >
From: Rick Rothstein on 25 Mar 2010 12:50 If I understand your question correctly, this should do what you want... Cells(Range("J7").End(xlDown).Row, Columns.Count).End(xlToLeft).Offset(, 1).Select -- Rick (MVP - Excel) "Munchkin" <Munchkin(a)discussions.microsoft.com> wrote in message news:2797FBC0-4A7C-4188-8624-F74472ADC69E(a)microsoft.com... > I want my macro to select J7, go to the record end, then go across to the > next cell, which is empty. As you can see when I recorded my macro it > referenced a specific cell instead (K751). Hope I explained clearly - > thanks > in advance for help. > > Range("J7").Select > Selection.End(xlDown).Select > Range("K751").Select >
From: Rick Rothstein on 25 Mar 2010 12:53 That code line should have all been on one line. Cells(Range("J7").End(xlDown).Row, Columns.Count).End(xlToLeft).Offset(, 1).Select -- Rick (MVP - Excel) "Rick Rothstein" <rick.newsNO.SPAM(a)NO.SPAMverizon.net> wrote in message news:#1e37sDzKHA.2552(a)TK2MSFTNGP04.phx.gbl... > If I understand your question correctly, this should do what you want... > > Cells(Range("J7").End(xlDown).Row, Columns.Count).End(xlToLeft).Offset(, > 1).Select > > -- > Rick (MVP - Excel) > > > "Munchkin" <Munchkin(a)discussions.microsoft.com> wrote in message > news:2797FBC0-4A7C-4188-8624-F74472ADC69E(a)microsoft.com... >> I want my macro to select J7, go to the record end, then go across to the >> next cell, which is empty. As you can see when I recorded my macro it >> referenced a specific cell instead (K751). Hope I explained clearly - >> thanks >> in advance for help. >> >> Range("J7").Select >> Selection.End(xlDown).Select >> Range("K751").Select >>
|
Pages: 1 Prev: Hiding menu options Next: Copy Filtered Data |