Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 9 of 9

Thread: General Format to Number Format changing in VBa

  1. #1
    Join Date
    2nd July 2005
    Posts
    10

    General Format to Number Format changing in VBa

    Hi Pals..
    I had face a problem..i am reading data from Autocad Object and write it to the excel sheet by VBA.i have String type data.i have comma as character in that value. so once i write it to excel cells the format of cell is automatically change to Number and so i can't get my data correctly.if anybody know how to change cells format from Number to genral thru VBA plz reply me..
    Thanks in Advance

    Guru...

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    24th January 2003
    Location
    Australia
    Posts
    31,716

    Re: General Format to Number Format changing in VBa

    Hi gurusathish

    Welcome to ozgrid

    Try
    VB:
    Range("A1").NumberFormat = "General" 
    
    

  3. #3
    Join Date
    2nd July 2005
    Posts
    10

    Re: General Format to Number Format changing in VBa

    Hi...
    Range("A1").NumberFormat="Genral"
    is not working... i have error as

    "Unable to set the NumberFormat Property for the Range Class"

    Plz Reply me regarding this..

    Thanks

    Guru

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    24th January 2003
    Location
    Australia
    Posts
    31,716

    Re: General Format to Number Format changing in VBa

    You have spelt "General" as "Genral". Fix your typo and it will work

  5. #5
    Join Date
    2nd July 2005
    Posts
    10

    Re: General Format to Number Format changing in VBa

    Hi...
    Its Working but i can't get my data as it is... i have data as 123,234 i get as 123234 in excel sheet.so u suggest me to get the data in the same way...

    Thanks

    Guru

    Excel Video Tutorials / Excel Dashboards Reports


  6. #6
    Join Date
    24th January 2003
    Location
    Australia
    Posts
    31,716

  7. #7
    Join Date
    2nd July 2005
    Posts
    10

    Re: General Format to Number Format changing in VBa

    Hi...
    I have data as "123,234" i had write this into excel sheet thru my VBA coding.but in excel i have the value as 123234. i want to be as 123,234 ,can u help me regarding this.

    plz tell me how can i specify text format for cells...

    Thanks

    Guru

    Excel Video Tutorials / Excel Dashboards Reports


  8. #8
    Join Date
    24th January 2003
    Location
    Australia
    Posts
    31,716

    Re: General Format to Number Format changing in VBa

    but in excel i have the value as 123234
    That's due to you changing the cell format to "General" which is what you requested.
    Last edited by Dave Hawley; July 2nd, 2005 at 19:09.

  9. #9
    Join Date
    2nd July 2005
    Posts
    10

    Re: General Format to Number Format changing in VBa

    Hi...

    i have "123,234" as String data that is important.. i had write the value of String data "123,234" in excel sheet.but i get the data in excel cell as 123,234 as number format with comma seperation.did u get me... so i want to be as a text/String Format cells can u give idea for me...

    Thanks

    Guru

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Replies: 4
    Last Post: September 18th, 2006, 22:35
  2. Changing verticle format to horizontal format
    By Aajaxx in forum EXCEL HELP
    Replies: 5
    Last Post: May 25th, 2006, 01:06
  3. Changing Number Format
    By spoonjy in forum Excel and/or Access Help
    Replies: 7
    Last Post: December 22nd, 2005, 10:34
  4. Changing numbers in text format to number format.
    By holbrookp in forum EXCEL HELP
    Replies: 2
    Last Post: March 8th, 2005, 01:51

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
  •  
porno