+ Reply to Thread
Results 1 to 13 of 13

Currency Conversion

Hybrid View

DanHegarty Currency Conversion 06-12-2007, 08:49 AM
WinteE Hi Dan, I've made you a... 06-12-2007, 12:12 PM
Peter1999 You could use something like... 06-12-2007, 12:19 PM
DanHegarty Re Above 06-12-2007, 07:00 PM
Peter1999 Sorry, I read back and... 06-13-2007, 04:02 AM
WinteE Hi Dan, Peter, The macro... 06-13-2007, 04:13 AM
  1. #1
    Registered User
    Join Date
    06-10-2006
    Posts
    12

    Currency Conversion

    Hi all,

    I have a budget spreadsheet which is currently expressed in euros, i would like a pair of option buttons which would allow me to toggle all the figures between euros and dollars.

    Anybody have any ideas?

    Thanks

  2. #2
    Forum Contributor WinteE's Avatar
    Join Date
    04-07-2007
    Location
    Netherlands
    Posts
    544
    Hi Dan,

    I've made you a sample, hope you're familiar with VBA. If not then feel free to ask for help/explanation.

    Cheers,
    Erik
    Attached Files Attached Files
    Just keep it simple !


    http://www.excelguide.eu
    In English as well as in Dutch

  3. #3
    Registered User
    Join Date
    04-30-2006
    Posts
    55
    You could use something like this. Use a validation list (this macro is for USD, GBP, EUR), to be selected in E2, and the number you wish to convert in F3. Hope this is what you need.

    Peter1999

    Sub Macro1()
    
    If (Range("E2") = "EUR") Then
    
        Range("F3").NumberFormat = "$ #,##0.00_-"
        
    Else:
    If (Range("E2") = "GBP") Then
        Range("F3").NumberFormat = "[$£-809]#,##0.00"
    
    Else:
    If (Range("E2") = "USD") Then
        Range("F3").NumberFormat = "[$$-409]#,##0.00"
    
    Else
    End If
    End If
    End If
    End Sub

  4. #4
    Registered User
    Join Date
    06-10-2006
    Posts
    12

    Re Above

    Hi Guys

    Thanks for your help but i'm afraid i'm still struggling.

    WintE, when i open your example, the buttons are not functional. I created some new buttons and assigned the appropriate macros to them. Unfortunately when i click on them nothing happens.

    Peter, I pasted your code in and then assigned it to a button, but again nothing happened when i pressed the button.

    Neither showed any debug faults but nothing happened!

    Please let me know if I'm doing something stupid.

    Thanks

    D

  5. #5
    Registered User
    Join Date
    04-30-2006
    Posts
    55
    Sorry, I read back and understood you were trying to do something else than I proposed. My code will just change the format. Maybe you could combine the two macros....

    I tested Eriks' code and it works fine with me. Could you specify what problem shows up?

    Peter1999

  6. #6
    Forum Contributor WinteE's Avatar
    Join Date
    04-07-2007
    Location
    Netherlands
    Posts
    544
    Hi Dan, Peter,

    The macro security is probably "High". You can change this via 'Tools', 'Macro', 'Security' and select 'Medium'.

    Erik

  7. #7
    Registered User
    Join Date
    06-10-2006
    Posts
    12

    Nearly there!

    Hi guys,

    That works brilliantly now. I was using excel on moc osx and it wasn't working but having tried it on a pc it is fine.

    One more problem however, the budget that I am working with is fairly large (roughly 1500 cells). When I use the conversion it locks the computer up for 3 or 4 minutes. This seems crazy given the fact that computers can perform millions of caluclations per second. I can visually see each number change as the macro works along the rows!

    One issue may be that there are many blank cells involved, but I want the buttons to cover the whole range in case figures are entered there at a later date.

    Really can't say thank you enough.

    D

+ 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