Dear Experts,

I have a macro that extracts worksheets from a central workbook into a new workbook and with a short macro that converts the formulas contained into values. However, i am looking for a simple code that would convert all the other formulas to values except the rows that contain excel function "Sum() or Subtotal()". Find below the current code used in converting to values.

       Dim wsh As Worksheet
            
            For Each wsh In ActiveWorkbook.Worksheets
            
            
                With wsh.UsedRange
                    .Value = .Value
                End With
                
            Next wsh
Many thanks in advance for your help.