#1   Report Post  
Posted to microsoft.public.excel.misc
nc nc is offline
external usenet poster
 
Posts: 119
Default Formula in Macro

Using I would like to make a value of a cell equal to a Excel function of a
range.

Example:

Sheet 1 Cell A1 = Sheet 2 max of range (A:A)

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Formula in Macro

bSub formulamacro()
Range("m1").Value = Application.Max(Sheets("sheet2").Columns(1))
Range("m2").Formula = "=max(sheet2!a:a)"
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"nc" wrote in message
...
Using I would like to make a value of a cell equal to a Excel function of
a
range.

Example:

Sheet 1 Cell A1 = Sheet 2 max of range (A:A)


  #3   Report Post  
Posted to microsoft.public.excel.misc
nc nc is offline
external usenet poster
 
Posts: 119
Default Formula in Macro

Don

Thanks a lot for your help.



"Don Guillett" wrote:

bSub formulamacro()
Range("m1").Value = Application.Max(Sheets("sheet2").Columns(1))
Range("m2").Formula = "=max(sheet2!a:a)"
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"nc" wrote in message
...
Using I would like to make a value of a cell equal to a Excel function of
a
range.

Example:

Sheet 1 Cell A1 = Sheet 2 max of range (A:A)



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
MACRO or FORMULA CHENG28 Excel Worksheet Functions 3 November 19th 09 03:21 PM
Formula or Macro M Hebert Excel Discussion (Misc queries) 2 June 27th 07 01:24 PM
Formula Macro Michael M Excel Worksheet Functions 6 November 11th 06 10:20 PM
formula to a macro help PLEASE Hemming Excel Discussion (Misc queries) 2 March 9th 06 03:16 PM
Macro Formula Corey Excel Discussion (Misc queries) 1 February 4th 06 06:13 PM


All times are GMT +1. The time now is 09:32 PM.

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"