+ Reply to Thread
Results 1 to 5 of 5

Nearest smallest and biggest number VBA issue

  1. #1
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    Nearest smallest and biggest number VBA issue

    Hi,

    Please have a look at the attached file.
    Using the below code I am just finding nearest biggest number and nearest smallest number

    Please Login or Register  to view this content.
    first statement 'small_x' showing error if I enter 'price_value' equal to '0' since there is no less value than '0' in the attached file
    last statement 'large_x' showing error if I enter 'price_value' equal to '400' since there is no higher value than '400' in the attached file

    Kindly help me to correct the above code to return '0' and '400' instead of showing error.

    Thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Nearest smallest and biggest number VBA issue

    Would this work?
    Please Login or Register  to view this content.
    Click on the star if you think I helped you

  3. #3
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    Re: Nearest smallest and biggest number VBA issue

    Hi adyteo,

    both showing compilation error

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Nearest smallest and biggest number VBA issue

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Nearest smallest and biggest number VBA issue

    Please Login or Register  to view this content.

+ 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] To find nearest biggest number
    By gan_xl in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-10-2013, 07:43 AM
  2. To find nearest biggest number
    By gan_xl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2013, 06:49 AM
  3. [SOLVED] Sorting out data in order to have bar graphs from biggest to smallest
    By bobby.bobby in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-08-2013, 06:50 AM
  4. Look for biggest number minus next largest
    By Sir08 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-25-2008, 03:35 AM
  5. Finding a name with biggest number
    By Handyy in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-06-2006, 08:15 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