Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Mar 11, 10:10*am, Dow wrote:
Hopefully this longer post helps explain the trouble I am having. Thank you for your help. The data from a report I run is large enough that it has to be put on 2 seperate worksheets each month, the tab names differ from month to month. I am looking for a macro that will look at a specific column in each worksheet and split the data out into seperate tabs. *For example the values in Column K on each worksheet can be one of 5 (or more) values A, B, C, D, or E. *I want all the rows with A copied onto a seperate sheet, all the rows with B's copied onto another sheet, etc. The code I found by Bernie Deitrick almost works. *There are some issues I am running into. Sometimes I get a "Run-time error '1004' Excel cannot create or use the data range reference because it is too complex". *When I go to debug this is highlighted: .SpecialCells(xlCellTypeVisible).Copy _ * * * * mySht.Range("A1") When I put the curser over this it shows "xlCelltypeVisible=12" It does not always do this. *Even in the same month if I rerun the data, following each steps exactly as I did before. *I hope someone can tell me why this is. The big issue I am having is that it does not leave all the data. I run the macro and it seems to go through both worksheets. *When I go to the created worksheets there are only enough rows to account for one sheet. *I believe it is overwriting the data from the first sheet with the data from the second sheet. Does anyone have any ideas how to append the data so that I get all of the information from both sheets? Okay...Figured out part of the problem myself. This code was NOT set up to loop through both worksheets like I thought. That was my mistake. Question now is, how do I set it up to loop through both and put all the data into the appropriate places? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a chart using data from multiple worksheets | Charts and Charting in Excel | |||
Creating Multiple Worksheets | Excel Discussion (Misc queries) | |||
Creating multiple worksheets... | Excel Worksheet Functions | |||
Creating a summary sheet from data across multiple worksheets | Excel Discussion (Misc queries) | |||
Appending worksheets | New Users to Excel |