![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Sydney/Brisbane , Australia
Posts: 539
|
in my vba coding i have the results
sugar=12 bird=11 dog=57 (based on other calculations) how can i write a formula to return the max value of these items? (i.e. 57) |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Kobe, Japan
Posts: 1,420
|
Hi Try this.
Sub test() Dim sugar, bird, dog sugar = 12 bird = 11 dog = 57 MsgBox Application.WorksheetFunction.Max(Array(sugar, bird, dog)) End Sub |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|