Cannot open consolidation source file

howsmydriving

New Member
Joined
Apr 14, 2011
Messages
1
Hi all!

This is my very first post, so please bear with me.

I read around a bit on the forum, and I couldn't find exactly the answer that I needed, so here goes. I've got a macro that I created using the macro recorder, which does this:
- copies some rows from "Sheet1", into a new sheet called "Albums"
- creates a third sheet called "Albums Cons"
- *attempts* to consolidate data from "Albums" into "Albums Cons"

However, I am receiving the "cannot open consolidation source file" error when the macro runs. The question is how should this "Albums" sheet be referenced? Here's the code:

Rich (BB code):
 ActiveSheet.Range("$E$1:$E$1048406").AutoFilter Field:=1, Criteria1:= _
        "Album"
    Cells.Select
    Selection.SpecialCells(xlCellTypeVisible).Select
    Selection.Copy
    Sheets("Albums").Select
    ActiveSheet.Paste
    Sheets.Add
    Sheets("Sheet3").Select
    Sheets("Sheet3").Name = "Albums Cons"
    ActiveWindow.SmallScroll Down:=-1
    Application.CutCopyMode = False
    Selection.Consolidate Sources:="Workbook1.Albums!R1:R30000", Function:=
        xlSum , TopRow:=False, LeftColumn:=True, CreateLinks:=False
It seems strange that it doesn't work, because it seems like it's pretty simple, and I recorded it with the macro recorder (which obviously worked), so hopefully someone can shed some light on this for me.

Thanks in advance for the help, I really appreciate it!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Explain what you think doing Consolidate is going to do for you.
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,314
Members
452,905
Latest member
deadwings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top