Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default F=$100, G=$-100, cut rows & paste in new sheet


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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default F=$100, G=$-100, cut rows & paste in new sheet

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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
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?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
paste data in different sheet but skip rows. CarmK Excel Discussion (Misc queries) 2 September 19th 08 02:23 PM
How can copy only the unhide rows and paste it another sheet svstpl Excel Discussion (Misc queries) 1 December 18th 07 10:17 AM
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows Scott Excel Worksheet Functions 0 December 13th 06 01:25 AM
paste excel sheet excluding hidden rows Bernie Excel Discussion (Misc queries) 3 March 5th 06 02:17 PM
Copy rows untill blank row then paste into new sheet Chris Salcedo Excel Programming 2 October 7th 05 07:29 PM


All times are GMT +1. The time now is 10:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"