This is what I am using now. Currently Sub TOC3. But I would like if my rows would end at like 15 and then move into a new column.
Please Login or Register to view this content.
This is what I am using now. Currently Sub TOC3. But I would like if my rows would end at like 15 and then move into a new column.
Please Login or Register to view this content.
Change all your Range references from, for example
toPlease Login or Register to view this content.
and usePlease Login or Register to view this content.
in place of "B"Please Login or Register to view this content.
Then use code like
Please Login or Register to view this content.
Bernie Deitrick
Excel MVP 2000-2010
How Do i put iCol=2 in place of B if i've already replaced B to be TOC.Cells(NewRow, iCol)
Sorry, that was poorly worded.
Once you have changed to TOC.Cells(NewRow, iCol), you need to initialize iCol so that the code will start populating in column B of TOC, so you need to add the line
iCol = 2
Somewhere in your code before you start using it to address cells within the TOC. So maybe right after the line
Const StartRow As Long = 5
iCol = 2
You can also, then, change
TOC.Cells(StartRow - 2, "B")
to
TOC.Cells(StartRow - 2, iCol)
I did, and received a compile error.
Please Login or Register to view this content.
Before you use a variable, you need to dimension it, since you are using "Option Explicit" at the top of your module. Honestly, given your code to this point, I'm surprised you weren't aware of that as a source of error.
Please Login or Register to view this content.
Ha, that is because I am standing on the shoulder of giants. (google)
OK I did. but I still have 36 rows of data. It didn't separate them. It didn't give me an error either though.
Using the button for charts put an ugly doubled text look on a cell - to get around that, I used the selection change event of the workbook.
Put this into the codemodule of the ThisWorkbook object
And use this code.Please Login or Register to view this content.
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks