Results 1 to 2 of 2
  1. #1
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,195

    Format Excel Cells to Number

    Hi Guy's this should be quite simple but unsure where i am wrong, i am trying to format specific cells in Excel as a number

    The recordset output is set to long integer but when the excel file is created, it comes out as a date 01/01/1900

    I have tried this but debugs

    .Worksheets(1).Range("C3:C50").NumberFormat = "Number"



    Kind Regards

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Try:

    .Worksheets(1).Range("C3:C50").NumberFormat = "0.00"

    or

    .Worksheets(1).Range("C3:C50").NumberFormat = "General"

    I use macro recorder to get these.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 04-15-2019, 01:49 PM
  2. Format cells containing spesific text
    By Naustvik in forum Access
    Replies: 1
    Last Post: 11-14-2018, 02:25 PM
  3. Replies: 5
    Last Post: 09-06-2018, 11:37 PM
  4. Excel exporting in single cells
    By Paolo29011982 in forum Import/Export Data
    Replies: 0
    Last Post: 07-29-2009, 04:48 AM
  5. Excel number format not working in Access
    By toad848 in forum Access
    Replies: 3
    Last Post: 03-24-2009, 11:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums