+ Reply to Thread
Results 1 to 8 of 8

Creating a User-Defined Range for Formulas

  1. #1
    Registered User
    Join Date
    04-09-2020
    Location
    USA
    MS-Off Ver
    2011
    Posts
    4

    Creating a User-Defined Range for Formulas

    Hey Folks,

    I'm trying to generate an InputBox that allows the user to define the variable that will determine the range for the values spit out by a Macro.

    Please Login or Register  to view this content.
    I keep getting an argument not optional error, and I'm unsure as to what it means here. I'm relatively new at this, and could use any help!

    Thanks folks,
    NP
    Last edited by AliGW; 04-11-2020 at 03:41 AM.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Creating a User-Defined Range for Formulas

    Possibly something like
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: Creating a User-Defined Range for Formulas

    You can use the Resize method of a range object to get the extended range.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    04-09-2020
    Location
    USA
    MS-Off Ver
    2011
    Posts
    4

    Re: Creating a User-Defined Range for Formulas

    Thanks for your help!

  5. #5
    Registered User
    Join Date
    04-09-2020
    Location
    USA
    MS-Off Ver
    2011
    Posts
    4

    Re: Creating a User-Defined Range for Formulas

    Alright, new problem, because I am not the best at this:

    Please Login or Register  to view this content.
    So, the new box works great for what I had asked in terms of user input. Now I just need to figure out how to get the value you've helped to generate to replace the destination range. Any ideas?
    Last edited by AliGW; 04-11-2020 at 03:41 AM.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: Creating a User-Defined Range for Formulas

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Please take a few minutes to read all Forum Rules and comply in the future.)



    Please Login or Register  to view this content.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,247

    Re: Creating a User-Defined Range for Formulas

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are new, I have added them for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Registered User
    Join Date
    04-09-2020
    Location
    USA
    MS-Off Ver
    2011
    Posts
    4

    Re: Creating a User-Defined Range for Formulas

    You are a genius, a scholar, and a saint! Thank you!

    I'm going to take some time to study this and figure out how you came to simplify it so well.

    Thank you once again!

+ 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. [SOLVED] creating user defined functions
    By dr01allen in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-14-2015, 02:53 PM
  2. Creating a User-Defined Function
    By Excel_vba in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-19-2014, 11:10 PM
  3. Copy, paste, replace- user defined range in all the defined sheets
    By aganesan99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-13-2014, 12:28 PM
  4. Excel 2007 : Creating user defined function
    By cassieyi in forum Excel General
    Replies: 1
    Last Post: 10-02-2011, 04:58 PM
  5. Need help in creating Sheet by using user defined data
    By LampCommandr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2011, 10:58 AM
  6. creating help info for user defined function
    By Joe Carroll in forum Excel General
    Replies: 3
    Last Post: 06-04-2005, 07:05 PM
  7. How to: User Form to assign a user defined range to a macro variab
    By TrevTrav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2005, 04: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