Excel/Consolidating the Data
I have multiple sheets Containing a word Currencies. I would like to consolidate the data from all the currencies tab in one new tab starting from A7. Also I would like to add their respective Item ID by inserting a new Column in consolidated tab. Item Id will be given in each tab in A4, also tab name contains the item ID.
Existing Currencies Tabs -
1. INT019 Curriencies
2. 12345 Curriencies
3. 123 Curriencies
There may be more or less tabs but the naming convention is going to same. Please help. I will email you the workbook. Let me know if you need any clarification.
Think this is what you want. I put it in Module8 of your workbook. It adds the summary sheet if it doesn't exist. If it does exist, it will append to the existing data in that sheet.
Dim sh As Worksheet, sh1 As Worksheet
Dim r As Range, r1 As Range, r1A As Range, i As Long
Dim cell As Range
On Error Resume Next
Set sh = Worksheets("Curriencies")
On Error GoTo 0
If sh Is Nothing Then
Set sh = ActiveSheet
sh.Name = "Curriencies"
For Each sh1 In Worksheets
If InStr(1, sh1.Name, sh.Name, vbTextCompare) Then
If sh.Name <> sh1.Name Then
Set r1A = sh1.Range("A5")
Set r1 = sh1.Range("A7", sh1.Cells(sh1.Rows.Count, "A").End(xlUp))
i = 0
For Each cell In r1
If Len(Trim(cell)) > 1 Then
i = i + 1
Set r1 = r1.Resize(i, 3)
Set r = sh.Cells(sh.Rows.Count, "A").End(xlUp).Offset(1, 0)
Set r = r.Resize(r1.Rows.Count, 1).Offset(0, 3)
r.Value = r1A.Value
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here