Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Strikethrough Text to be identified with code
What column holds the cell to inspect? Is that cell on the same row as myRow?
maybe... If .Cells(myRow, 26).Font.Strikethrough = True Then (26 means column Z. Change it to what you want.) Corey wrote: Thanks for the reply John. I cannot work out where and if i can use it with: Private Sub ComboBox6_DropButtonClick() Application.ScreenUpdating = False 'Place the References in here for the Roll Numbers and Lengths Dim lastcell As Long Dim myrow As Long lastcell = workSheets("InspectionData").Cells(Rows.Count, "A").End(xlUp).Row With ActiveWorkbook.workSheets("InspectionData") .Select 'first thing to do with a With statement that occurs on a second sheet For myrow = 2 To lastcell If .Cells(myrow, 1) < "" Then If .Cells(myrow, 1).Offset(-1, 2).Text = ComboBox28.Text And .Cells(myrow, 1).Offset(-1, 6).Text = ComboBox1.Text And IsNumeric(Trim(Mid(.Cells(myrow, 1), 2))) = True Then If Cells(1, 1).Font.Strikethrough = True Then ' <=============== Here ? ComboBox6.AddItem Cells(myrow, 3).Offset(2, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(3, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(4, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(5, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(6, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(7, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(8, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(9, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(10, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(11, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(12, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(13, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(14, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(15, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(16, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(17, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(18, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(19, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(20, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(21, 0) ComboBox6.AddItem Cells(myrow, 3).Offset(22, 0) End If End If End If Next End With End Sub I tried it above also as: If .Cells(myrow, 1).Offset(-1, 2).Text = ComboBox28.Text And .Cells(myrow, 1).Offset(-1, 6).Text = ComboBox1.Text And IsNumeric(Trim(Mid(.Cells(myrow, 1), 2))) = True and .cells.font.Strikethrough = False Then But if 1 value in ALL the list has Strikethrough i get NO values at all then? Corey.... -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Check boxes and text strikethrough / color change | Excel Worksheet Functions | |||
Need to remove text with strikethrough - Excel 2007 | Excel Worksheet Functions | |||
Each client to be identified into segment | Excel Discussion (Misc queries) | |||
Strikethrough Text to be identified with code | Excel Programming | |||
Empty cell Identified | Excel Programming |