Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Column If Usedrange of Column ISBLANK Follow-up [email protected] Excel Discussion (Misc queries) 1 April 12th 09 10:00 PM
Why is worksheet.usedrange empty? Sara Excel Worksheet Functions 2 August 24th 07 03:38 PM
Excel 2007 BUG UsedRange/LastCell differences with Excel2003. keepITcool Excel Discussion (Misc queries) 2 May 31st 06 06:18 PM
Real Value of .UsedRange.Rows.Count dazman Excel Worksheet Functions 2 August 25th 05 03:24 PM
Usedrange Terry VanDuzee Excel Programming 6 August 10th 03 05:57 PM


All times are GMT +1. The time now is 11:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"