Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide Column If Usedrange of Column ISBLANK Follow-up | Excel Discussion (Misc queries) | |||
Why is worksheet.usedrange empty? | Excel Worksheet Functions | |||
Excel 2007 BUG UsedRange/LastCell differences with Excel2003. | Excel Discussion (Misc queries) | |||
Real Value of .UsedRange.Rows.Count | Excel Worksheet Functions | |||
Usedrange | Excel Programming |