![]() |
max of a range every set amount
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? |
max of a range every set amount
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 " wrote: 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? |
All times are GMT +1. The time now is 03:12 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com