From an export file I get the following data in a column. €9,08 € 8,67- €6,82 €10,87 € 7,23-
The negative ones are text and the positive ones are numbers. I want the text rows to be a negative number. Can someone help me how I can solve this. Thank you very much for the help. GJM
CodePudding user response:
Select the column and try to replace with RegExp:
If you want a script, for simplest case it could be this:
function myFunction() {
SpreadsheetApp.getActiveSheet()
.getRange('A:A')
.createTextFinder('(. ?)(-)')
.useRegularExpression(true)
.replaceAllWith('$2$1');
}
It will make the same changes in column 'A'.