+ Reply to Thread
Results 1 to 5 of 5

How to Use Integers/number Referencing in Excel VBA Formula??

  1. #1
    Registered User
    Join Date
    11-27-2012
    Location
    France
    MS-Off Ver
    Excel 2007
    Posts
    65

    How to Use Integers/number Referencing in Excel VBA Formula??

    Hi,

    I am trying to reference an integer (number/decimal) in a NORMINV (inverse probability) formula which is:

    Please Login or Register  to view this content.
    So, the input dialog asks for a number "s" (for example 95) which is then multiplied by 0.01 and then called "k", the problem is the formula is not recognizing k, it just puts k as k in the formula! How to use the obtained value of k in the formula? I mean what is the proper referencing for integers or numbers in the excel formula?

    I declared k and s as string.

    Thanks alot in advance!

    Sanjeev

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: How to Use Integers/number Referencing in Excel VBA Formula??

    Hi

    your k is inside inverted commas so appears as text.

    Try:-

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: How to Use Integers/number Referencing in Excel VBA Formula??

    You need to "pull" the k outside the double quotes like like you did with LastRow
    Gary's Student

  4. #4
    Registered User
    Join Date
    11-27-2012
    Location
    France
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: How to Use Integers/number Referencing in Excel VBA Formula??

    Thanks mehmetcik and Gary's Student for your replies.

    The formula gives error even when i put k in double quotes:

    Please Login or Register  to view this content.
    I don't know why?

  5. #5
    Registered User
    Join Date
    11-27-2012
    Location
    France
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: How to Use Integers/number Referencing in Excel VBA Formula??

    I solved the problem by putting the value of k in a cell and absolute referencing the cell location in the formula!

    Here it is:

    Please Login or Register  to view this content.
    It worked! Thanks for your help.

+ 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