ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change hard code to Variable syntax (https://www.excelbanter.com/excel-programming/276922-re-change-hard-code-variable-syntax.html)

Bob Phillips[_5_]

Change hard code to Variable syntax
 
Stuart,

Try

LastRow = Application.Max(.Cells(Rows.Count,£Col+2) _
.End(xlUp).Row, .Cells(Rows.Count,£Col+3)) End(xlUp).Row, _
.Cells(Rows.Count,£Col+4)) End(xlUp).Row)


--

HTH

Bob Phillips

"Stuart" wrote in message
...
LastRow = Application.Max(.Range("H65536") _
.End(xlUp).Row, .Range("I65536").End(xlUp).Row, _
.Range("J65536").End(xlUp).Row)

is given code that works perfectly for the type of sheet it
was designed for. I would like to extend its' use by using
'£Col + 2' to represent col H, +3 for I and + 4 for J.

What is the correct syntax for this, please?

Regards.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 01/09/2003






All times are GMT +1. The time now is 12:03 PM.

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