Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Guys, Can anybody help me convert a number say, "1,253-" to "-1,253" Let's say that the data is in column G. The database usually put the negative sign at the end and excel read this as text. I hope somebody can help me create a macro for this. :) -- japorms ------------------------------------------------------------------------ japorms's Profile: http://www.excelforum.com/member.php...fo&userid=6544 View this thread: http://www.excelforum.com/showthread...hreadid=533523 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Select the cells with the data you want to change, then run the
following macro: Sub ChangeNeg() Dim Rng As Range Dim Pos As Long For Each Rng In Selection.Cells If Right(Rng.Text, 1) = "-" Then Rng.Value = Left(Rng.Text, Len(Rng.Text) - 1) * -1 End If Next Rng End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "japorms" wrote in message ... Guys, Can anybody help me convert a number say, "1,253-" to "-1,253" Let's say that the data is in column G. The database usually put the negative sign at the end and excel read this as text. I hope somebody can help me create a macro for this. :) -- japorms ------------------------------------------------------------------------ japorms's Profile: http://www.excelforum.com/member.php...fo&userid=6544 View this thread: http://www.excelforum.com/showthread...hreadid=533523 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey, also get yourself this free excel utility called ASAP. You'll love
it. www.asap-utilities.com john |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks Guys! You all have very helpful. Its working perfectly. I use the one Chip suggested. Thanks Chip! :) -- japorms ------------------------------------------------------------------------ japorms's Profile: http://www.excelforum.com/member.php...fo&userid=6544 View this thread: http://www.excelforum.com/showthread...hreadid=533523 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Converting "uppercase" string data to "lower case" in CSV file | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel |