+ Reply to Thread
Results 1 to 5 of 5

German currency SUM in excel using Macro

  1. #1
    Registered User
    Join Date
    08-02-2010
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    1

    German currency SUM in excel using Macro

    Hello All,

    Please help me out on this,

    I have a excel report with German currency values on one column as mentioned below. I need help to create a Macro which will calculate the SUM of all of these values without changing the cell or values format.

    553,12*
    165,44*
    435,52*
    1.574,86*
    564,40*
    197,84*
    1.259,84*
    315,32*
    190,84*
    1.139,92*

    Thanks in advance!!!

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: German currency SUM in excel using Macro

    Maybe

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-25-2010
    Location
    Lisbon
    MS-Off Ver
    Excel 2007
    Posts
    92

    Re: German currency SUM in excel using Macro

    Hello bob

    you switched the word Evlauate, lolo

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: German currency SUM in excel using Macro

    Isn't German currency supposed to be Euros?

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: German currency SUM in excel using Macro

    Hmm, the Evaluate did not work for me. I think the problem is that the numbers are stored as text, and show the German number format with a decimal comma and a dot as the thousand separator. In that format, Excel does not recognise the numbers when the regional settings have different delimiters.

    The following UDF can calculate the sum of the values represented by the text. First, the dot is removed from the text, then the decimal comma is replaced with a decimal point. Then the text gets converted to numbers and is summed.

    There are probably slicker ways of coding this, but I'm no VBA whiz.

    Please Login or Register  to view this content.
    The code goes into a standard module. Then, in the spreadsheet use it with this syntax:

    =textsum(A1:A10)


    Let me know if this works for you.

+ 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