Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

max of a range every set amount

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cynthia.derama@gmail.com - 30 Nov 2007 16:18 GMT
Hello!

I have to create a macro to get the max of a set range of 24 cells
repeating throughout the spread sheet.  i'm not familiar with the
syntax of vb for excel.  does anyone have any suggestions?
Mike H - 30 Nov 2007 16:45 GMT
Possibly

Sub sheetLoop()
Dim Count As Integer
Dim I As Integer
Count = ActiveWorkbook.Worksheets.Count
Dim maximum(100) As Long
  For I = 1 To Count
    maximum(I) =
WorksheetFunction.Max(ActiveWorkbook.Worksheets(I).Range("A1:A24"))
   MsgBox ActiveWorkbook.Worksheets(I).Name & " Max value = " & maximum(I)
  Next I
End Sub

Mike

> Hello!
>
> I have to create a macro to get the max of a set range of 24 cells
> repeating throughout the spread sheet.  i'm not familiar with the
> syntax of vb for excel.  does anyone have any suggestions?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.