I have a workbook which consist of a main sheet "Monthly collection reeport" and few sheets with dates. I need to pull the data from all sheets (only total column C14-D14) to main sheet "Monthly" (C4-D14 ) one below other first column with sheet names in column B1-B13 respectively.
相关问题
- Excel sunburst chart: Some labels missing
- Error handling only works once
- Error handling only works once
- Excel formula in VBA code
- Excel VBA run time error 450 from referencing a ra
相关文章
- Get column data by Column name and sheet name
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
- Unregister a XLL in Excel (VBA)
- How to prevent excel from truncating numbers in a
- numeric up down control in vba
- Declare a Range relative to the Active Cell with V
- What's the easiest way to create an Excel tabl
So the final codes will be
Sub xxxxx() Dim j As Integer x = Sheets.Count ' count no of sheets For j = 4 To x + 2 Range("B" & j) = Worksheets(j - 2).Name ' main sheet must be the first, run code from main sheet Next End Sub
Adjust this to your needs: