分类：电脑/网络-软件
问题：excelVBA提取各SHEET的最大值和最小值将BOOK1中各 
将BOOK1中各SHE的数据（最大数值和最小数值）提取到SHEET4中，各SHEET需提取的数值只有一组，在大区域内的位置并不固定。请看附件：
回答：Sub 按钮1_单击()  Set myb = reateObject("scripting.dictionary"): a = 1: ActiveSheet.Cells.Clear      [c1] = "最大": [l1] = "最小"For Each sh In Sheets    If sh.Name <> "结果" And Application.WorksheetFunction.CountA(sh.Cells) > 0 Then    With sh    a = a + 1       For Each rng In .[a65536].End(xlUp).Resize(, 10)       If Not myb.exists(rng.Value) Then              Set myb(rng.Value) = rng.Offset(-1)              Else              Set myb(rng.Value) = Union(myb(rng.Value), rng.Offset(-1))           End If           Next        myb(Application.WorksheetFunction.Max( ys)).Copy Cells(a, 3)        myb(Application.WorksheetFunction.Min( ys)).Copy Cells(a, 12)        Cells(a, 1) = .Name        myb.RemoveAll         End With        End If        Next        Set myb = Nothing        End Sub结果在工作表"结果"表中.