Posts by ExcelChick

    Re: Paste from one worksheet to a range of cells on another worksheet

    I expect that when it hits a cell with text in it (I guess thats the error in this case) that it will fill up 6 cells. What should I put instead of

    On Error Resume Next?

    When I comment out 'On Error Resume Next' it highlights this and says Runtime error 1004 application defined or object defined error
    c = c.Offset(-5).Resize(6)

    Re: Paste from one worksheet to a range of cells on another worksheet

    hm when I do this it's almost like it just skips the

    [COLOR=#333333]c.Offset(-5).Resize(6) [/COLOR]

    Then it doesn't fill anything... Should I be using "" instead of vbNullstring? Am I using strVariable = vbNullString properly?

    Re: Paste from one worksheet to a range of cells on another worksheet

    This is awesome - thanks so much! I got this to work:

    Worksheets("Sup_Data").Range("C" & Rows.Count).End(xlUp).Offset(1).Resize(CMTRow).PasteSpecial (xlPasteValues)

    Now I am loving this resize thing! I'm trying to Fill blank cells upwards 6 rows and am trying to use this to no avail - is this possible?:

    So if there's text in G7 it would fill up to blank cells G2:G6. The below works great for fill down (without the resize)...

    Re: Paste from one worksheet to a range of cells on another worksheet

    What do you mean fully qualified?

    Is there a way to get it to paste the values after the last row of data? Something like this with the resize?

        Worksheets("Sup_Data").Range("C" & Rows.Count).End(xlUp).Offset(1).PasteSpecial (xlPasteValues) .Resize (CSGRows)

    This isn't working :(

    I am trying to paste one cell into a certain range. I'm using the introw/intcol defined as integers because it will be easier to add a row count when I go to the next 14 worksheets and need to paste the same cell. I am getting Runtime error 1004 Application defined or object defined error when I get to the worksheets("sup_data") line. Can anyone help me paste the value from the other worksheet?

    With Worksheets("CAN")
        Worksheets("Sup_Data").Range(Cells(intRow_02, intCol_03), Cells((intRow_02 + CMTRow), intCol_03)).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    End With



    I am relatively new to VBA and have cobbled together some code that basically stacks the data from certain cells from one worksheet and pastes them into another. it then filters on the wanted data, selects the visible cells, and pastes into a new worksheet. The code is running really slowly and I'll need to have it copy and paste from 14 other tabs as well (the data is all in the same ranges defined in the code). I do not know how to have it loop through my 14 other worksheets or make it so that the execution time is suitable for even one tab of data. (see 'Copy and paste Supervised data into Sup_Data Tab section) I think this section is causing the hang up because it's going through cell by cell and there's a ton?
    The 14 other worksheets are:

    For the 'Inserts CSG Name section I have a certain number of cells/rows I need to paste into from the "CAN" worksheet (and the 14 others eventually). I need those to be stacked on top of eachother but here I've just called out where they go rather than being able to say paste it in 587 rows or 604 rows subsequently

    I have tried to optimize this section with the vbNullString to fill a certain text upwards that will be needed in the final stacked data (to create a pivot) - but I'm not sure if there's a better way.[/COLOR][/B]

    [COLOR=#ff8c00][B]Here is the remainder of my code: