LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Find Lowest Column Among Several

Dim maxrow as Long, lastrow as Long, i as long
maxrow = 1
with ObjCurrent.Worksheets("Accounts")
for i = 1 to 6
lastRow = .Cells(rows.count,i).End(xlup)
if lastrow maxrow then maxrow = lastrow
Next
Set objProduction = .Range("A4").Resize(maxrow - 3, 6)
End With

--
Regards,
Tom Ogilvy

"MDW" wrote in message
...
Say I've got the line

Set objProduction = objCurrent.Worksheets("ACCOUNTS").Range("A4:F600")

in code. On the worksheet "ACCOUNTS", the last entry by the user might be

in
row 23. However, it may be in column A, or column C, or column E.

Is there any way for Excel to detect that, among those 8 columns, the

lowest
used row is 23, and then resize the range?
--
Hmm...they have the Internet on COMPUTERS now!



 
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
Find the lowest number in a given column smartin Excel Worksheet Functions 8 June 28th 09 08:01 PM
How to find lowest value in row steve1040 Excel Discussion (Misc queries) 1 June 8th 09 05:03 AM
Find the lowest value in a row jlo Excel Worksheet Functions 2 May 2nd 08 08:06 PM
Find the 10 lowest of 20 numbers in column and enter those 10 in a shred77 Excel Worksheet Functions 14 October 21st 07 09:47 PM
how do i find the lowest number in a column in Excel? MKA808 Excel Discussion (Misc queries) 4 August 23rd 05 07:27 PM


All times are GMT +1. The time now is 05:26 AM.

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

About Us

"It's about Microsoft Excel"