ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Acivecell.Formula Offset End(xlUp) (https://www.excelbanter.com/excel-programming/356628-acivecell-formula-offset-end-xlup.html)

[email protected]

Acivecell.Formula Offset End(xlUp)
 
How can i convert the macro below to Acivecell.Formula = ??? i.e get
the cell reference of the resulting cell.

Sub activece()
ActiveCell.Value = ActiveCell.Offset(0, -1).End(xlUp)
End Sub

Thxs


Martin

Acivecell.Formula Offset End(xlUp)
 
Stick .Address at the end

" wrote:

How can i convert the macro below to Acivecell.Formula = ??? i.e get
the cell reference of the resulting cell.

Sub activece()
ActiveCell.Value = ActiveCell.Offset(0, -1).End(xlUp)
End Sub

Thxs



[email protected]

Acivecell.Formula Offset End(xlUp)
 
Try this:

Sub activece()
ActiveCell.Value = ActiveCell.Offset(0, -1).End(xlUp).Address
End Sub


Tom Ogilvy

Acivecell.Formula Offset End(xlUp)
 
Sub activece()
ActiveCell.Formula = "=" & ActiveCell.Offset(0, -1).End(xlUp).Address
End Sub


--
Regards,
Tom Ogilvy

" wrote:

How can i convert the macro below to Acivecell.Formula = ??? i.e get
the cell reference of the resulting cell.

Sub activece()
ActiveCell.Value = ActiveCell.Offset(0, -1).End(xlUp)
End Sub

Thxs




All times are GMT +1. The time now is 09:53 PM.

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