ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range End(x1up) problems (https://www.excelbanter.com/excel-programming/404102-range-end-x1up-problems.html)

Paul Lambson

Range End(x1up) problems
 

I am trying to select the last cell in collum then offset one row down
to paste an object. I keep getting an error. What am I doing wrong?

Range(Range("AH").End(x1down).Offset(1, 0)).Select

Thanks in advance,
Paul

Andrew Taylor

Range End(x1up) problems
 

There are at several problems he:

- x1Down should be xlDown (with a letter L, not number 1)
- Range("AH") is not valid - you probably mean Range("AH1") (or maybe
Range("A8")?)
- You don't need the outer Range function, as the End and Offset
methods
return a Range object.

So Range("AH1").End(xlDown).Offset(1, 0).Select should do the trick





On 11 Jan, 16:19, Paul Lambson wrote:
I am trying to select the last cell in collum then offset one row down
to paste an object. I keep getting an error. What am I doing wrong?

Range(Range("AH").End(x1down).Offset(1, 0)).Select

Thanks in advance,
Paul



Mike H

Range End(x1up) problems
 
Paul,

To be sure its the last cell look from the bottom up with this


Range("AH65536").End(xlUp).Offset(1).Select

Mike

"Paul Lambson" wrote:


I am trying to select the last cell in collum then offset one row down
to paste an object. I keep getting an error. What am I doing wrong?

Range(Range("AH").End(x1down).Offset(1, 0)).Select

Thanks in advance,
Paul


Gary''s Student

Range End(x1up) problems
 
Sub ordinate()
Range("AH" & Cells(Rows.Count, "AH").End(xlUp).Row + 1).Select
End Sub

--
Gary''s Student - gsnu200764


"Paul Lambson" wrote:


I am trying to select the last cell in collum then offset one row down
to paste an object. I keep getting an error. What am I doing wrong?

Range(Range("AH").End(x1down).Offset(1, 0)).Select

Thanks in advance,
Paul



All times are GMT +1. The time now is 09:52 AM.

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