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
- 25905 reads
Recent comments
5 years 1 week ago
5 years 39 weeks ago
5 years 51 weeks ago
6 years 1 week ago
6 years 2 weeks ago
6 years 8 weeks ago
6 years 16 weeks ago
6 years 16 weeks ago
6 years 16 weeks ago
6 years 16 weeks ago