+ Reply to Thread
Results 1 to 2 of 2

Macro: To Prompt Selection of Range and output to Cell

  1. #1
    Registered User
    Join Date
    12-06-2021
    Location
    Nevada, USA
    MS-Off Ver
    Office 365 for enterprise
    Posts
    2

    Macro: To Prompt Selection of Range and output to Cell

    Hi All,

    I'm trying to create a macro to prompt a user to (via mouse-click) select their own range of cells, them output the Standard Deviation of those cells into a cell of my choosing.

    Capture.JPG

    I'd like to click on Cell E3, and have it prompt me to "Select your cell Range", Calculate the Standard Deviation of cells B2:B7 (in this case), and display the value in cell E3 (that I had initially selected via mouse cursor). I realize this can be easily accomplished via manually typing in a formula, but this is a process I'll use on multiple; workbooks, many time over, and for the life of me, I cant seem to combine the multiple processes into a single code.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Macro: To Prompt Selection of Range and output to Cell

    Dim SelRng As Range
    Set SelRng = Application.InputBox (Prompt, Title, Default, Left, Top, HelpFile, HelpContextID, Type:=8)

    Type:=8, input must be a range.
    Ben Van Johnson

+ 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. Userform; Output displays in varying range depending on Combobox selection
    By mtn123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-28-2021, 03:54 AM
  2. Activate a macro by cell selection within range
    By diddlysquat in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-21-2017, 07:35 PM
  3. Using a selection from a list to create an output in a different cell
    By derhamo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-22-2015, 05:40 AM
  4. [SOLVED] Radio Button Output for Cell Selection
    By dblcrona in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-27-2014, 10:58 AM
  5. How to prompt for range selection and increment rows?
    By ljCharlie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2009, 12:05 PM
  6. [SOLVED] CMD prompt output
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-28-2006, 04:00 AM
  7. [SOLVED] Prompt on selection of cell?
    By Lynn Kurtz in forum Excel General
    Replies: 2
    Last Post: 02-11-2005, 05:06 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