I have a worksheet from a customer which include negative numbers however the negative numbers have the negative sign at the back.
These are three columns as an example..
<code>ADJUSTMENTS_$ OTHER_CHARGES_$ TOTAL_$_EXCL_GST 48131.75- 840.97 37560.92- 48131.75- 1140.92 36230.24- 48131.75 1036.25 37053.90 24216.95 517.04 18357.23 24216.95- 701.6 17468.25-
</code>I wish to develop a macro to find the cells with this negative number in the worksheet. So I need to find cells with "-" sign at the end , for these cells I need to remove the "-", and then multiply the number to get into correct negative format.<code>
</code><code>ADJUSTMENTS_$ OTHER_CHARGES_$ TOTAL_$_EXCL_GST -48131.75 840.97 -37560.92 -48131.75 1140.92 -36230.24 48131.75 1036.25 37053.90 24216.95 517.04 18357.23 -24216.95 701.6 -17468.25
my worded plan is this....
Open workbook
look on first sheet 'data is only on first sheet
find any cell with "-" at the end of the string
</code><code>For all cells with </code>that are found
<code>replace this "-" with "" and then multiply by that cell by -1
do for all cells (loop required)
Save worksheet
</code><code>
</code></pre>
These are three columns as an example..
<code>ADJUSTMENTS_$ OTHER_CHARGES_$ TOTAL_$_EXCL_GST 48131.75- 840.97 37560.92- 48131.75- 1140.92 36230.24- 48131.75 1036.25 37053.90 24216.95 517.04 18357.23 24216.95- 701.6 17468.25-
</code>I wish to develop a macro to find the cells with this negative number in the worksheet. So I need to find cells with "-" sign at the end , for these cells I need to remove the "-", and then multiply the number to get into correct negative format.<code>
</code><code>ADJUSTMENTS_$ OTHER_CHARGES_$ TOTAL_$_EXCL_GST -48131.75 840.97 -37560.92 -48131.75 1140.92 -36230.24 48131.75 1036.25 37053.90 24216.95 517.04 18357.23 -24216.95 701.6 -17468.25
my worded plan is this....
Open workbook
look on first sheet 'data is only on first sheet
find any cell with "-" at the end of the string
</code><code>For all cells with </code>that are found
<code>replace this "-" with "" and then multiply by that cell by -1
do for all cells (loop required)
Save worksheet
</code><code>
</code></pre>