View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dorothy[_3_] Dorothy[_3_] is offline
external usenet poster
 
Posts: 3
Default If cell value is the same

On May 30, 4:16*pm, "ctm" wrote:
Ended up with:
Application.ScreenUpdating = False
* * Dim lastcell As Long
* * Dim myrow As Long
* * * *lastcell = Worksheets("Sheet1").Cells(Rows.Count,
"A").End(xlDown).Row
* *With ActiveWorkbook.Worksheets("Sheet1")
* * * * For myrow = 2 To lastcell
* * * * * * If .Cells(myrow, 1) < "" And .Cells(myrow, 1).Offset(-1,
0).Value = "" Then
* * * * * * * * If .Cells(myrow, 1).Offset(1, 0).Value = .Cells(myrow,
1).Offset(0, 0).Value Then
* * * * * * * * * * For i = 1 To 22
* * * * * * * * * * If .Cells(myrow, 1).Font.Strikethrough = True Then
* * * * * * * * * * .Cells(myrow, 1).Offset(i, 0).Font..Strikethrough = True
* * * * * * * * * * Else
* * * * * * * * * * If .Cells(myrow, 1).Font.Strikethrough < True Then
* * * * * * * * * * .Cells(myrow, 1).Offset(i, 0).Font..Strikethrough = False
* * * * * * * * * * End If
* * * * * * * * * * End If
* * * * * * * * * * Next i
* * * * * * * * * *End If
* * * * * * End If
* * * * * * * Next
* * * * * * * End With
* * Application.ScreenUpdating = True

Ctm"Corey ...." wrote in message

...



I need a simple code to see if there are anyduplicate valuesin column A
of sheet 1.
I need the code to search fromt he top of the sheet down.
If the first duplicated value is (.font.strikethrough)=True then i need
ALL other values that are duplicated(exactly the same) to be also changed
to .Font.Strikethrough=True.


If the first dulpicated value is NOT .FontStrikethrough then the
remainingduplicate valuesare to be also Not .Font.Strikethrough.


How would i go about this ?


CTm- Hide quoted text -


- Show quoted text -


Dear Corey,

you can use Filord for this: www.filord.com

Regards/Dorothy