View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sojo Sojo is offline
external usenet poster
 
Posts: 21
Default find and move values <0

Thanks for all the post. However, I did not add that my columns run from A
to DO (this will be constant) and row go to 2280 (this will not be contant).
So, I think IanC's idea of a macro would be easier.

I copied and pasted the macro as is into a VB module, but it didn't work. I
don't know much about code, so can't figure out what I did wrong.

Any thoughts?


"IanC" wrote:

For r = 2 To 100
If Cells(r, 1).Value < 0 Then
Cells(r, 1).Copy
Cells(r, 2).PasteSpecial
Cells(r, 1).Value = ""
End If
Next

--
Ian
--
"Sojo" wrote in message
...
I am writing a macro to automate several processes. I have the following
table where column A has positive and negative values and column B is
blank.
I need a formula that will find all the negative values in column A and
move
them to column B. In essence, it needs to say if number in column A < 0,
then cut it and paste it into column B.

A B
1. Original Negative
2. 3.72545
3. 3.4584
4. 3.1071
5. -0.460399
6. -0.803222
7. -1.12457