+ Reply to Thread
Results 1 to 6 of 6

Variable and Constant Difference

  1. #1
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Variable and Constant Difference

    1) The book presents some examples of variables as you see below. It says the stuff on the left of the equilibrium are variables the stuff on the right of the equilibrium are values.

    x = 1
    x = x + 1
    Interest Rate = 0,075
    DataEntered = False
    x = x + 1
    MyNum = YourNum*1,25
    UserName = "Bob Johnson"
    DateStarted = #12/14/2009#

    I also know that named values are called "Constants" and variables of which type aren't specified are "Variants" (These variables aren't specified so they should be called variants)

    As you see there is a concept mess. Can you clear it?


    2) DateStarted = #12/14/2009#

    Do we present dates in "#"?

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Variable and Constant Difference

    Basically a Constant's value will never change, and a Variable's value may change.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Try these 2 similar procedures.. The constant one will return error..
    Last edited by NeedForExcel; 01-18-2016 at 11:28 PM.
    Cheers!
    Deep Dave

  3. #3
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Variable and Constant Difference

    I don't understand the examples you give.

  4. #4
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Variable and Constant Difference


  5. #5
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Variable and Constant Difference

    What do you not understand?

  6. #6
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Variable and Constant Difference

    Conceptually:
    The Radius of a circle would be represented by a variable because the radius will vary with the circle in question.
    The value of Pi would be represented by a constant, because it never varies.

    In Code That might look like

    Please Login or Register  to view this content.
    In practice, when in doubt cast an argument as a variable.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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. Variable and constant question.
    By calvinle in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-26-2015, 06:31 AM
  2. [SOLVED] insert one row between a constant difference
    By anindya.zen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-25-2014, 06:47 AM
  3. Replies: 8
    Last Post: 12-16-2013, 05:24 PM
  4. Call a constant/variable by creating another variable
    By pienaaj in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-12-2013, 10:36 AM
  5. Sum of constant + variable = constant
    By neurogirl900 in forum Excel General
    Replies: 3
    Last Post: 12-19-2011, 11:02 PM
  6. How to average one constant # to variable #s? A1:A2 A1:A3 A1:A4
    By Colfax in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-01-2006, 10:55 PM
  7. [SOLVED] Variable Acting Like a Constant?
    By George Boynton in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2005, 12:05 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