View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Kent Kent is offline
external usenet poster
 
Posts: 1
Default F=$100, G=$-100, cut rows & paste in new sheet

There seems to be an error with the
...Find(v * -1).Activate line.

Any suggestions?


"R..VENKATARAMAN" wrote:

try this sub

Public Sub test()
Worksheets("sheet2").Activate
Dim v As Double
v = Worksheets("sheet1").Range("f1")
With Worksheets("sheet2").Columns("g:g")
..Find(v * -1).Activate
End With
MsgBox ActiveCell
MsgBox ActiveSheet.Name & " " & ActiveCell.Address
End Sub

"Kent" wrote in message
...

I have a sheet that i need to be able to compare data in two columns (F:G)
I need to identify cells that are equal but opposite. For Example where
F50=100 and G106=-100
When a match like this occurs, I need to have the entire rows cut from the
present sheet and pasted to a new sheet "Net"
I would think that i should be able to start at f1 and search G:G for
(f1*-1), then move to f2 and do the same, cut and pasting when applicable.

I amn not very good with macro formula's
Any suggestions?