Posts by Mumps

    Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. Make a selection in column L.

    Assuming your data starts in row 1, try:

    Try:

    In the file you posted, I don't see any colour formatting for any player in column B. The font formatting is all "Automatic" (black). Could you please explain what you mean by:

    Quote


    Player10, Player20,.......to.......Player 120 are in a slightly lighter font

    Could you attach a copy of your file? It would be easier to see how your data is organized and to test possible solutions. Include a detailed explanation

    of what you want to do using a few examples from your data and referring to specific cells, rows, columns and sheets. De-sensitize the data if necessary.

    I'm glad everything worked out. :) Just a comment about your code: Recording a macro is a good start but most often the result is not very efficient. To give you an example, you don't very often need to select a cell or a range to perform an action on it.

    for example, this code:

    Code
    With Sheets("Original").Select
        Columns("A:I").Select
        Selection.Copy
        Range("A2").Select
        Sheets("Bank").Select
        Range("A1").Select
        ActiveSheet.Paste
    End With

    can be written like this:

    Code
    Sheets("Original").Columns("A:I").Copy Sheets("Bank").Range("A1")

    or:

    Code
    Range("B2:BE5000").Select
    Selection.ClearContents

    can be written like this:

    Code
    Range("B2:BE5000").ClearContents

    This would speed up the macro and make it much shorter. There are other things you could do to improve the code efficiency. Do a little research in what can be done to make a macro run more quickly. I'm sure you will find many such methods. :)

    Try:

    Try this approach with no additional macros needed.

    Place this code at the end of your GenerateXML macro:

    Code
    With ActiveSheet
        .Shapes.Range(Array("Button 1")).Visible = False
        .Shapes.Range(Array("Button 2")).Visible = True
    End With

    Place this code at the end of your ClearData macro:

    Code
    With ActiveSheet
        .Shapes.Range(Array("Button 1")).Visible = True
        .Shapes.Range(Array("Button 2")).Visible = False
    End With

    Place the headings in row 1 of Sheet2 and try this macro: