Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ok, have a little problem I need some help on.
I've look at pearson's site, but didn't see anything that would wor for me (if I'm wrong, please point me in the right direction) I have 2 worksheets. I need to look compare column H from the firs worksheet with Column A of the second worksheet and check fo duplicates. What I need is that if the any text in column H on the first workshee matches any text in column A of the second worksheet, need to selec the row from the first worksheet that contians that duplicate. Thanks in advance -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Stevem;
You can use this; Sub TryCompare() Sheets("Sheet1").Select HomeSheet = activeworksheet.Name Cells(1, 1).Select Sheets("Sheet2").Select OtherSheet = ActiveSheet.Name Cells(1, 8).Select Sheets(HomeSheet).Select While Not ActiveCell = "" MyTextToLookFor = ActiveCell Sheets(OtherSheet).Select Cells(1, 8).Select Do While Not ActiveCell = "" If Trim(ActiveCell) = Trim(MyTextToLookFor) Then 'here is where you copy the line and put it somewhere ActiveCell.EntireRow.Copy Exit Do End If ActiveCell.Offset(1, 0).Select Wend ActiveCell.Offset(1, 0).Select Wend End Sub Thanks, Greg -----Original Message----- Ok, have a little problem I need some help on. I've look at pearson's site, but didn't see anything that would work for me (if I'm wrong, please point me in the right direction) I have 2 worksheets. I need to look compare column H from the first worksheet with Column A of the second worksheet and check for duplicates. What I need is that if the any text in column H on the first worksheet matches any text in column A of the second worksheet, need to select the row from the first worksheet that contians that duplicate. Thanks in advance. --- Message posted from http://www.ExcelForum.com/ . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, that code didn't work, compile errors, and I couldn't fix i
myself. Opened a new thread with better explanation (I hope) Thanks for the help though, it did get me thinking, and got my brai back into the Excel mode of things. -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I alphabetize the tabs on a spreadsheet with 25 tabs? | Excel Worksheet Functions | |||
sheet tabs is checked but I can't see my tabs | Excel Discussion (Misc queries) | |||
tabs are missing even though 'tools-options-view-sheet tabs' ok? | Excel Worksheet Functions | |||
Duplicates in excel that aren't 100% DUPLICATES ... | Excel Discussion (Misc queries) | |||
hide tabs from view then lock tabs? | Excel Discussion (Misc queries) |