ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Minus signs after number (https://www.excelbanter.com/excel-programming/352512-minus-signs-after-number.html)

Crowbar via OfficeKB.com

Minus signs after number
 
I have results like 54- it should be -54

but when I use & command to join them the correct way and do sum to calculate
tham, it always results with a 0

Any ideas on how to get the minus on the correct side that can be used to
calculate totals would be appreciated

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200602/1

Tom Ogilvy

Minus signs after number
 
Dim rng as Range, cell as Range
set rng = Activesheet.UsedRange.Specialcells(xlConstants,xlT extValues)
for each cell in rng
if right(cell,1) = "-" then
cell.Formula = cdbl(cell.Value)
end if
Next

--
Regards,
Tom Ogilvy

"Crowbar via OfficeKB.com" <u15117@uwe wrote in message
news:5b7a7f00ab08b@uwe...
I have results like 54- it should be -54

but when I use & command to join them the correct way and do sum to

calculate
tham, it always results with a 0

Any ideas on how to get the minus on the correct side that can be used to
calculate totals would be appreciated

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200602/1





All times are GMT +1. The time now is 06:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com