XLA Routines: EE_ReverseSignInRange
Sub EE_ReverseSignInRange(rng As Range) 'http://excelexperts.com/xla-routines-eeReverseSignInRange for updates on this sub routine ' takes a range as input and reverses the sign of numbers in the range ' turns positive numbers negative and negative numbers positive Dim theCell Set rng = Intersect(rng.Parent.UsedRange, rng) ' rng.select For Each theCell In rng If Application.IsNumber(theCell.value) Then theCell.value = theCell.value * -1 End If Next End Sub
»
- Nick's blog
- Login or register to post comments
- 29177 reads
Recent comments
5 years 43 weeks ago
6 years 29 weeks ago
6 years 41 weeks ago
6 years 44 weeks ago
6 years 45 weeks ago
6 years 50 weeks ago
7 years 6 weeks ago
7 years 7 weeks ago
7 years 7 weeks ago
7 years 7 weeks ago