+ Reply to Thread
Results 1 to 4 of 4

How to create a array which holds decimal values

  1. #1
    Registered User
    Join Date
    12-10-2011
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    56

    How to create a array which holds decimal values

    How to create a array which holds decimal values and check whether a value is present in that array using VBA

    For ex :

    If the value for a variable x lies between 1.2.3.1 to 1.2.3.50 then i should be getting a message stating "Good"...
    If the value of the variable is not in the above list ( ex - say 1.2.3.56), then the msgbox should be "Not available"..

    Values which will be entered are decimal points like given above..

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How to create a array which holds decimal values

    This will create a one-dimensional array with the values 1.2.3.1, 1.2.3.2, ..., 1.2.3.50.
    Please Login or Register  to view this content.
    You can then use Application.Match to check if a value is in the array.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-10-2011
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: How to create a array which holds decimal values

    Hi, I am getting a Type mismatch error, when i try the above code.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How to create a array which holds decimal values

    Can you post your code and indicate where it errors?

+ 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. Replies: 5
    Last Post: 03-05-2014, 11:23 AM
  2. Create an array based off values in another array - exclude blanks
    By clifton1230 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2013, 05:35 PM
  3. Create array from registry values
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-26-2010, 10:37 AM
  4. Filling Source Data Array with Decimal Values
    By John Michl in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 03-22-2006, 12:20 PM
  5. Replies: 1
    Last Post: 06-10-2005, 09:05 AM

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