Efficient method or query to replace

If multiple columns contains negative numbers then Replace “-” with (number).
Example

A B C D
0 -24.45 0 2.45
-11 0 0 0

Expected output
A B C D
0 (24.45) 0 2.45
(11) 0 0 0

Hi,

Can you try the following sample?

row(col) = "("+row(Col).ToString.TrimStart("-"c)+")"

Sample20230405-3L.zip (8.6 KB)

Regards,

Thanks @Yoichi for your solution.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.