+ Reply to Thread
Results 1 to 2 of 2

Accessing automatically generated NumberFormat string

  1. #1
    Registered User
    Join Date
    09-13-2010
    Location
    Bombay, India
    MS-Off Ver
    Excel 2007
    Posts
    1

    Accessing automatically generated NumberFormat string

    I recorded the following macro : Clicked 'Format cells' - Currency and selected US $ . Correspondingly the .NumberFormat property of the range was set to something like "$#,## ...... "
    These strings are automatically generated every time a different currency is selected eg Euro or Pound.
    Now I want to develop a macro that accesses these mappings through excel - vba. I do not want to manually type out a switch case or an If statement . Eg . If Range("E4").value= "US" Then Range("F4").NumberFormat = "$#,##........." This is because I want to enter the name of any of the currencies in a cell and get the corresponding format in another. I should be able to access all the currencies available in excel.

  2. #2
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Accessing automatically generated NumberFormat string

    This macro will take the currency sign from the immediate left cell for all the selected cells. ie for USD you have to give $ sign instead of US
    Please Login or Register  to view this content.

    rgds

    johnjohns

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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