0

I got a long list (1 million rows) with negative values. I need a formula (VBA) that automatically divides all the values lower then -40000 by 1000. (ex: -120000 is 120) (ex 2: -10000 is -10000)

The column is D.

Thanks!

Wolfschmitt
  • 33
  • 1
  • 8

2 Answers2

0

You could use this one (using SiddharthRout's approach from this A):

Sub test()
    [A1:A100000] = [INDEX(IF(A1:A100000<-40000,A1:A100000/1000,A1:A100000),)]
End Sub
Community
  • 1
  • 1
Dmitry Pavliv
  • 35,333
  • 13
  • 79
  • 80
0

In E1 enter:

=IF(D1<-40000,D1/1000,D1) and copy down

Gary's Student
  • 95,722
  • 10
  • 59
  • 99