![]() |
Find Usedrange question
How best to find the usedrange for just
columns H to J, please? By that I mean say H4:J500, where row 4 is the location of the first data in any of cols H to J, and row 500 is the last row in H, I or J with any data. The data is a single capital or lower case letter. Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 |
Find Usedrange question
Dim LastRow as Long
With Worksheets("sheet1") LastRow = _ application.max(.range("H501").end(xlup).row, _ .range("I501").End(xlup).row, _ .range("J501").end(xlup).row) End With if LastRow < 4 then msgbox "Bad Data" End if -- Regards, Tom Ogilvy Stuart wrote in message ... How best to find the usedrange for just columns H to J, please? By that I mean say H4:J500, where row 4 is the location of the first data in any of cols H to J, and row 500 is the last row in H, I or J with any data. The data is a single capital or lower case letter. Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 |
Find Usedrange question
Many thanks.
Regards. "Tom Ogilvy" wrote in message ... Dim LastRow as Long With Worksheets("sheet1") LastRow = _ application.max(.range("H501").end(xlup).row, _ .range("I501").End(xlup).row, _ .range("J501").end(xlup).row) End With if LastRow < 4 then msgbox "Bad Data" End if -- Regards, Tom Ogilvy Stuart wrote in message ... How best to find the usedrange for just columns H to J, please? By that I mean say H4:J500, where row 4 is the location of the first data in any of cols H to J, and row 500 is the last row in H, I or J with any data. The data is a single capital or lower case letter. Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 |
All times are GMT +1. The time now is 01:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com