Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Trying to find a way to fill in the rest of a row if it is a dupli
I have a large spread sheet that has a list of numbers and letters in one
column, and the rows are filled with other information like title, yes or no, any other number&letter connected to it,and some other things. I have filled in some of the information for some of these, but i see that there are duplicates(which i need to keep). Is there a way i could condition the cells, or have a function, to fill in the rest of the row if it is a duplicate? (just filling in what the first duplicate has or the previous duplicate so it would do this throughout the document?) Any suggestions will be helpful! :) |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Trying to find a way to fill in the rest of a row if it is a dupli
Here's a code way
Sub CopyDuplicates() Dim iLastRow As Long Dim i As Long Dim cell As Range iLastRow = Cells(Rows.Count, "A").End(xlUp).Row For i = 2 To iLastRow Set cell = Nothing Set cell = Range("A1:A" & i - 1).Find(Cells(i, "A").Value) If Not cell Is Nothing Then cell.EntireRow.Copy Cells(i, "A") End If Next i End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Robert Brown" wrote in message ... I have a large spread sheet that has a list of numbers and letters in one column, and the rows are filled with other information like title, yes or no, any other number&letter connected to it,and some other things. I have filled in some of the information for some of these, but i see that there are duplicates(which i need to keep). Is there a way i could condition the cells, or have a function, to fill in the rest of the row if it is a duplicate? (just filling in what the first duplicate has or the previous duplicate so it would do this throughout the document?) Any suggestions will be helpful! :) |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Trying to find a way to fill in the rest of a row if it is a dupli
I am trying to find a function/condition that maybe able to do this, thanks
for the input though! "Bob Phillips" wrote: Here's a code way Sub CopyDuplicates() Dim iLastRow As Long Dim i As Long Dim cell As Range iLastRow = Cells(Rows.Count, "A").End(xlUp).Row For i = 2 To iLastRow Set cell = Nothing Set cell = Range("A1:A" & i - 1).Find(Cells(i, "A").Value) If Not cell Is Nothing Then cell.EntireRow.Copy Cells(i, "A") End If Next i End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find last occurance of text in range | Excel Worksheet Functions | |||
How to fill colour in Excel, it appers No fill in my computer? | Excel Discussion (Misc queries) | |||
Fill automatically from one worksheet to another based on cel valu | Excel Discussion (Misc queries) | |||
Excel printing problem - won't print cell under a "fill effect" bo | Excel Discussion (Misc queries) | |||
HOW TO USE FIND OR SEARCH FUNCTION TO FILL DATA | Excel Worksheet Functions |