ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   minimum value in range (https://www.excelbanter.com/excel-programming/312965-minimum-value-range.html)

SUNIL

minimum value in range
 
Min = Application.WorksheetFunction.Min(Range(Cells(Row% , 6), Cells(Row%,
9)))
if min=0 then.......

This command ignores blank cells , but i also want it to ignore cells
containing a value 0, or 0.0 or 0.00 , is this possible




Tom Ogilvy

minimum value in range
 
sStr = Cells(row,6).Resize(1,4).Address(0,0,,True)
dblMin = Evaluate("Min(if(IsNumber(" & sStr & ")*(" & _
sStr & "<0)," & sStr & "))")

--
Regards,
Tom Ogilvy



"SUNIL" wrote in message
...
Min = Application.WorksheetFunction.Min(Range(Cells(Row% , 6), Cells(Row%,
9)))
if min=0 then.......

This command ignores blank cells , but i also want it to ignore cells
containing a value 0, or 0.0 or 0.00 , is this possible






Jarek[_20_]

minimum value in range
 

Tom,
your solution is wonderful! Please, can you navigate me/us to othe
examples for 'Evaluate' ?

Thanks, Jarek



Tom Ogilvy Wrote:
sStr = Cells(row,6).Resize(1,4).Address(0,0,,True)
dblMin = Evaluate("Min(if(IsNumber(" & sStr & ")*(" & _
sStr & "<0)," & sStr & "))")

--
Regards,
Tom Ogilvy



"SUNIL" wrote in message
...
Min = Application.WorksheetFunction.Min(Range(Cells(Row% , 6)

Cells(Row%,
9)))
if min=0 then.......

This command ignores blank cells , but i also want it to ignor

cells
containing a value 0, or 0.0 or 0.00 , is this possible




--
Jare
-----------------------------------------------------------------------
Jarek's Profile: http://www.excelforum.com/member.php...info&userid=96
View this thread: http://www.excelforum.com/showthread.php?threadid=26759


Tom Ogilvy

minimum value in range
 
Evaluate will accept strings that would be valid if entered into a worksheet
cell. In this case, the string was an array formula.

--
Regards,
Tom Ogilvy


"Jarek" wrote in message
...

Tom,
your solution is wonderful! Please, can you navigate me/us to other
examples for 'Evaluate' ?

Thanks, Jarek



Tom Ogilvy Wrote:
sStr = Cells(row,6).Resize(1,4).Address(0,0,,True)
dblMin = Evaluate("Min(if(IsNumber(" & sStr & ")*(" & _
sStr & "<0)," & sStr & "))")

--
Regards,
Tom Ogilvy



"SUNIL" wrote in message
...
Min = Application.WorksheetFunction.Min(Range(Cells(Row% , 6),

Cells(Row%,
9)))
if min=0 then.......

This command ignores blank cells , but i also want it to ignore

cells
containing a value 0, or 0.0 or 0.00 , is this possible





--
Jarek
------------------------------------------------------------------------
Jarek's Profile:

http://www.excelforum.com/member.php...nfo&userid=965
View this thread: http://www.excelforum.com/showthread...hreadid=267591




Jarek[_21_]

minimum value in range
 

Thank you, Tom
Jare

--
Jare
-----------------------------------------------------------------------
Jarek's Profile: http://www.excelforum.com/member.php...info&userid=96
View this thread: http://www.excelforum.com/showthread.php?threadid=26759



All times are GMT +1. The time now is 12:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com