Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Robert Brown
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Robert Brown
 
Posts: n/a
Default 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
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
Find last occurance of text in range farutherford Excel Worksheet Functions 5 August 30th 05 02:00 AM
How to fill colour in Excel, it appers No fill in my computer? bede Excel Discussion (Misc queries) 1 June 11th 05 03:27 AM
Fill automatically from one worksheet to another based on cel valu guillaumet Excel Discussion (Misc queries) 4 June 6th 05 02:17 AM
Excel printing problem - won't print cell under a "fill effect" bo dmotika Excel Discussion (Misc queries) 0 May 26th 05 04:38 PM
HOW TO USE FIND OR SEARCH FUNCTION TO FILL DATA hsg Excel Worksheet Functions 2 November 18th 04 07:24 AM


All times are GMT +1. The time now is 08:49 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"