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

I want to save the minimum value of column B at "d"
So i define.
==============

Dim d As Long

d="=MIN($B:$B)"
================


However, it doesn't work. How can I save the number?
I can print it on a cell (for example, Cells(1,1)="=MIN($B:$B)" )

Thx'''

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 186
Default minimum value

Hi,

Are you wanting to assign the minimum value to the variable "d?"

d = WorksheetFunction.Min(Columns("B"))

HTH
--
Ken Hudson


"kirke" wrote:

I want to save the minimum value of column B at "d"
So i define.
==============

Dim d As Long

d="=MIN($B:$B)"
================


However, it doesn't work. How can I save the number?
I can print it on a cell (for example, Cells(1,1)="=MIN($B:$B)" )

Thx'''


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default minimum value

You cannot use a worksheet function directly in VBA, but you can call it as
part of the application object

d = Application.MIN(Range("B:B"))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"kirke" wrote in message
oups.com...
I want to save the minimum value of column B at "d"
So i define.
==============

Dim d As Long

d="=MIN($B:$B)"
================


However, it doesn't work. How can I save the number?
I can print it on a cell (for example, Cells(1,1)="=MIN($B:$B)" )

Thx'''



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
Minimum value look up [email protected] Excel Worksheet Functions 3 October 7th 08 02:35 AM
minimum and the corresponding value dinesh kumar Excel Worksheet Functions 4 September 12th 07 08:59 PM
Minimum Value Alex Excel Worksheet Functions 2 August 1st 07 03:44 PM
How to lookup the minimum, 2nd minimum and 3rd minimum......... Mark McDonough Excel Worksheet Functions 8 July 15th 06 09:39 PM
Minimum but One?? twogoodtwo Excel Worksheet Functions 3 November 29th 05 02:52 PM


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