Results 1 to 5 of 5

Formatting Data in VBA

Threaded View

  1. #1
    Registered User
    Join Date
    08-04-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    41

    Formatting Data in VBA

    In my workbook, cells(16,6) =0.001502


    The code below is returning curr_price=1.50160245635267E-03

    I need the code to return 0.001502

    Any suggestions would be greatly appreciated!

    My code is as below

    Private Sub lb_disc_Click()
    Dim mcounter As Integer
    Dim curr_price As Double

    select_tx_dis.Value = lb_disc.Value
    Worksheets("1. Discount Fees").Select
    Set Z = ThisWorkbook
    For mcounter = 1 To 19 Step 1
    If Cells(mcounter + 15, 1) = lb_disc.Value Then
    curr_price = Cells(mcounter + 15, 6)

    End If
    Next mcounter
    tx_current_price = curr_price

    End Sub

    Kindly help me.
    Last edited by somani123; 12-12-2014 at 12:54 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. formatting of a cell to 2 decimal places
    By JohnD0e in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-02-2010, 11:11 PM
  2. conditional formatting for 0 in 2 decimal places
    By mingali in forum Excel General
    Replies: 11
    Last Post: 02-27-2010, 05:34 AM
  3. Formatting decimal places
    By thetallguy0 in forum Excel General
    Replies: 2
    Last Post: 03-04-2008, 09:03 AM
  4. conditonally formatting decimal places
    By BigMikeGallagher in forum Excel General
    Replies: 0
    Last Post: 04-06-2006, 01:10 PM
  5. Formatting Currenty - decimal places
    By JTF in forum Excel General
    Replies: 2
    Last Post: 07-21-2005, 02: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