ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Go to record end, then one across (https://www.excelbanter.com/excel-programming/441029-go-record-end-then-one-across.html)

munchkin

Go to record end, then one across
 
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


Bob Phillips[_4_]

Go to record end, then one across
 
Try

Range("J5").End(xlDown).Offset(0, 1).Select

--

HTH

Bob

"Munchkin" wrote in message
...
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




Jacob Skaria

Go to record end, then one across
 
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


Rick Rothstein

Go to record end, then one across
 
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" wrote in message
...
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


Rick Rothstein

Go to record end, then one across
 
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" wrote in message
...
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" wrote in message
...
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



All times are GMT +1. The time now is 08:50 PM.

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