Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Summing values formatted for a different locale

+1
−0

A couple of year ago a user of Super User reported difficulties with summing values purporting to be Euros imported to LibreOffice Calc in CSV format.

In the Q the user does not mention the locale settings, but did write "I've used the LEFT function to get just the number part, though that still leaves me with a string." Some sample data was provided, but not its location so assuming the following:

Sample data

and , to separate thousands, . for decimal, how to determine the sum of the above text-format amounts?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

2 comment threads

Needs more details (1 comment)
The separators look to be inverted (1 comment)

1 answer

+3
−0

LEFT returns a text value, so it's working as expected. You might put the LEFT function inside VALUE function to convert the value returned by LEFT into a number. This applies to other spreadsheet apps like Google Sheets.

NOTES:

  1. Countries that use Euros as their local currency use a dot as a thousand separator and commas as a decimal separator. The above assumes that the spreadsheet is set to a country that uses Euros as currency.
  2. If your spreadsheet is set to use separators the other way, then use SUBSTITUTE to replace the comma with a dot.

References

Notes

Based on my answer posted in Super User to the question that inspired this question a few moments ago.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

`.` with `,` and vice versa (1 comment)

Sign up to answer this question »