+ Reply to Thread
Results 1 to 6 of 6

Beginner Macro Question - Selecting all cells?

  1. #1
    Registered User
    Join Date
    09-20-2011
    Location
    Ballymena, Northern Ireland
    MS-Off Ver
    Microsoft 365
    Posts
    16

    Beginner Macro Question - Selecting all cells?

    I have a macro that is designed to work in a particular report .csv and simply reformat it. However the report changes each time it is run and the macro is only formatting the number of rows etc that existed on the version that it was recorded on originally. Obviously the scrolling etc was the recorder tacking on my checking of the report after it was run and is not necessary.

    What I need is for the macro to select and reformat ALL active cells in the csv each time, regardless of how many or how few there are in the given instance?

    As you may have guessed I am not a programmer in the slightest and have zero knowledge of VBA, I am simply trying to save myself the headache of a boss who keeps asking me to do the exactly the same reformat job every day!

    Thanks for any help anyone can give me on this!

    S

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Beginner Macro Question - Selecting all cells?

    Hi,

    Upload your workbook, and in a note describe what you are trying to do with reference to specific cells/ranges

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    09-20-2011
    Location
    Ballymena, Northern Ireland
    MS-Off Ver
    Microsoft 365
    Posts
    16

    Smile Re: Beginner Macro Question - Selecting all cells?

    Wow that was quick!
    I have attached 2 files, one is the raw CSV saved as .xlsx and the other is the finished reformat

    S
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Beginner Macro Question - Selecting all cells?

    Hi,

    Try the attached. It's essentially a blank workbook containing the macros to reformat the .xlsx sheet. Just click the blue button and then choose the file to be reformatted and subtotalled.

    Regards
    Attached Files Attached Files
    Last edited by Richard Buttrey; 09-20-2011 at 08:30 AM.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Beginner Macro Question - Selecting all cells?

    Hi,

    It struck me that you might also like to see what a Pivot Table version of this file could be like.

    In general Pivot Tables are much more flexible and quickly give you an analysis by the various field names. If you're not familiar yet with Pivot Tables I suggest you might like to play around, dragging and dropping field names wherever you want to see the effect. Your boss may be even more pleased with the greater level of analysis that can be brought.

    Regards
    Attached Files Attached Files
    Last edited by Richard Buttrey; 09-20-2011 at 08:55 AM.

  6. #6
    Registered User
    Join Date
    09-20-2011
    Location
    Ballymena, Northern Ireland
    MS-Off Ver
    Microsoft 365
    Posts
    16

    Re: Beginner Macro Question - Selecting all cells?

    wow, thank you so much Richard, I will definitely have a play around with the worksheets you have provided.

    So amazingly helpful and so quick too!!

    Stephen

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1