Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default find minimum non-blank value

Hi.

I have a statement which, for a given row, retrieves the value from column
2, of the form:

x = Sheets("Sheet1").Cells(RowNum, 2)

How do I rewrite this to retrieve the minimum non-blank value from columns 2
- 5?

Thanks in advance for your help.

....Larry
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default find minimum non-blank value

Try this

x = WorksheetFunction.Min(Sheets("Sheet1").Columns(2))

Mike

"lallen" wrote:

Hi.

I have a statement which, for a given row, retrieves the value from column
2, of the form:

x = Sheets("Sheet1").Cells(RowNum, 2)

How do I rewrite this to retrieve the minimum non-blank value from columns 2
- 5?

Thanks in advance for your help.

...Larry

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default find minimum non-blank value

Thanks Mike. That wasn't exactly what I was looking for, but it pointed me in
the right direction. What worked for me was:

x = WorksheetFunction.Min(Sheets("Sheet1").Range("B" & RowNum & ":E" &
Rownum))

Thanks again for the quick response.

....Larry

"Mike H" wrote:

Try this

x = WorksheetFunction.Min(Sheets("Sheet1").Columns(2))

Mike

"lallen" wrote:

Hi.

I have a statement which, for a given row, retrieves the value from column
2, of the form:

x = Sheets("Sheet1").Cells(RowNum, 2)

How do I rewrite this to retrieve the minimum non-blank value from columns 2
- 5?

Thanks in advance for your help.

...Larry

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
Need Minimum excluding blank cells Rita Brasher Excel Programming 9 November 4th 08 06:47 PM
Find minimum value caroline Excel Worksheet Functions 1 March 7th 08 06:25 PM
Find minimum value in column. dlbeiler Excel Worksheet Functions 3 October 12th 07 05:55 PM
Looking for faster way to find minimum value [email protected] Excel Programming 2 July 3rd 06 03:40 PM
Find minimum value greater than a particular value John Michl Excel Worksheet Functions 3 April 27th 06 07:10 PM


All times are GMT +1. The time now is 08:14 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"