Posts by Mumps

    Assuming your data starts in row 1, 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:


    Player10, Player20, 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:

    1. With Sheets("Original").Select
    2. Columns("A:I").Select
    3. Selection.Copy
    4. Range("A2").Select
    5. Sheets("Bank").Select
    6. Range("A1").Select
    7. ActiveSheet.Paste
    8. End With

    can be written like this:

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


    1. Range("B2:BE5000").Select
    2. Selection.ClearContents

    can be written like this:

    1. 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 this approach with no additional macros needed.

    Place this code at the end of your GenerateXML macro:

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

    Place this code at the end of your ClearData macro:

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

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

    Have you tried posting the code with the formatting, logging out, closing your browser, re-opening it and then re-opening your post? All I can tell you is that when I do this the formatting disappears. I believe that Logit has the same problem.


    Place this macro in a separate workbook. The macro assumes that the sheet to be formatted will always be the first sheet in each workbook. Change the folder path (in red) to suit your needs.

    I asked this question a while back but I didn't get a solution so I thought that I would try again. When I post code using code tags in a response to a question, the code loses its 'indentation' formatting. Immediately after it is posted, it seems to retain the formatting. However, when the post is closed and then re-accessed, the 'indentation' formatting is gone. Please refer to my response in Post #2 at this link:

    VBA Macros code - copy paste transposed loop - Excel VBA / Macros - OzGrid Free Excel/VBA Help Forum

    You will note that the 'indentation' that was there in my original post, is no longer there. This creates a problem when someone copies/pastes the code. The formatting has to be re-entered manually. Does anyone have any suggestions as to why this happens?

    Manually remove the green colour in column F if it exists. Then select all the cells with data in column F and create two conditional formatting rules using the following two formulae:

    =F2="BUY" ---- select Green for fill format and Red in font colour format

    =F2="SELL" ---- select Red for fill format and White in font colour format

    Create a sheet named "Result" that has the following headers in row 1 starting in column A:

    Car Country Brand Spare Parts

    Try this macro: