+ Reply to Thread
Results 1 to 3 of 3

Coding assistance for TextBox Vlookup rounding to 2 decimals

Hybrid View

  1. #1
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,955

    Coding assistance for TextBox Vlookup rounding to 2 decimals

    Hi All

    Please help. I am trying to force my TextBox to show a value to 2 decimals with no luck. Have tried all possibilities.

    TextBox3 = Application.WorksheetFunction.VLookup(TextBox1.Text, Format(Sheet2.Range("B2:O25"), 5, False), "0.00")
    or
    TextBox3 = Application.WorksheetFunction.VLookup(TextBox1.Text, Format(Sheet2.Range("B2:O25"), 5, "0.00", False))
    etc etc etc

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,918

    Re: Coding assistance for TextBox Vlookup rounding to 2 decimals

    TextBox3 = Format(Application.WorksheetFunction.VLookup(TextBox1.Text, Sheet2.Range("B2:O25"), 5, False), "0.00")
    We don't know if the values in Sheet2.Range("B2:O25") are text strings or numeric...
    Last edited by protonLeah; 08-07-2016 at 02:50 PM.
    Ben Van Johnson

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,955

    Re: Coding assistance for TextBox Vlookup rounding to 2 decimals

    Of course....Silly me. Been at it all day. Blinkers lol.

    Thanks protonLeah

+ 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. Rounding Decimals
    By MR-77 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-21-2015, 03:18 AM
  2. Rounding decimals below and above 0,50
    By Hitch75 in forum Excel General
    Replies: 4
    Last Post: 09-23-2010, 08:15 AM
  3. Rounding decimals
    By Russell719 in forum Excel General
    Replies: 2
    Last Post: 08-24-2007, 12:09 PM
  4. Rounding Up Decimals
    By Lilbit in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-04-2006, 04:45 PM
  5. Rounding Decimals
    By Jim May in forum Excel General
    Replies: 8
    Last Post: 11-07-2005, 02:10 PM
  6. [SOLVED] Re: Rounding with no Decimals...
    By Karthik in forum Excel General
    Replies: 1
    Last Post: 07-29-2005, 02:06 PM
  7. rounding decimals in an IF statement
    By static69 in forum Excel General
    Replies: 1
    Last Post: 05-04-2005, 09:20 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