+ Reply to Thread
Results 1 to 3 of 3

Recording New Macro For a Randomly Selected Range Of Cells

  1. #1
    Registered User
    Join Date
    01-10-2015
    Location
    Dublin, Ireland
    MS-Off Ver
    Office 2013
    Posts
    29

    Recording New Macro For a Randomly Selected Range Of Cells

    Hi, This is my first post on this forum, so here goes.

    I am using Office 2013 and I have a spreadsheet that has downloaded currency data in some cells, but it is in a European format i.e. decimal, point for thousand separator and comma for decimal point.

    I need to record a "replace" macro that will be applied ONLY to a selection of cells that I will select immediately before running the macro. The range will be different every time.

    I have no problem recording the macro, but when I run it, it applies the formatting to the entire worksheet.

    How can I apply the macro to a selection of cells only?

    Tommy

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Recording New Macro For a Randomly Selected Range Of Cells

    Submit your recorded macro code

    Edit: Nvm. Will be easier just to give you code:
    Please Login or Register  to view this content.
    Last edited by stnkynts; 01-10-2015 at 12:36 PM.

  3. #3
    Registered User
    Join Date
    01-10-2015
    Location
    Dublin, Ireland
    MS-Off Ver
    Office 2013
    Posts
    29

    Re: Recording New Macro For a Randomly Selected Range Of Cells

    Thanks stnkynts

    Replaced "Cells" with "Selection" and it works fine now.

    T
    Last edited by butterscotch; 01-10-2015 at 04:55 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA code to loop through a range of selected cells, to add to my macro
    By craig schultz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-27-2014, 10:30 AM
  2. [SOLVED] UDF concatenate randomly chosen cells from range (Horizontal Range)
    By cheesefry in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-15-2014, 03:54 AM
  3. Macro or function that changes value of selected range or ranges of cells
    By ychartra01 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-06-2009, 06:11 PM
  4. Randomly choosing cells from a selected range
    By kjones505 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-19-2009, 12:56 PM
  5. [SOLVED] How to generate a list of randomly selected numbers within a range
    By Bob in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-07-2005, 02:15 PM

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