Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Font strikethrough
Hi,
How can i coded in vba to check whether the column of two words in the cells has the font strikrthrough equal to true and append the word in cell with "is strikethrough". example: column a column b column d apple apple apple is strikethough where apple is strike through. thanks, regards, Ben |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Font strikethrough
Hi
try with activesheet.range("A1") if .Font.Strikethrough or .offset(0,1).Font.Strikethrough then .offset(0,3).value="is strikethrough" end if end with "Ben" wrote: Hi, How can i coded in vba to check whether the column of two words in the cells has the font strikrthrough equal to true and append the word in cell with "is strikethrough". example: column a column b column d apple apple apple is strikethough where apple is strike through. thanks, regards, Ben |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Font strikethrough
Hi Frank,
Thanks, it works well. Can it be used in the range of cells for example from range "a2:a400"? how do u coded in vba? thanks. regards, Ben "Frank Kabel" wrote: Hi try with activesheet.range("A1") if .Font.Strikethrough or .offset(0,1).Font.Strikethrough then .offset(0,3).value="is strikethrough" end if end with "Ben" wrote: Hi, How can i coded in vba to check whether the column of two words in the cells has the font strikrthrough equal to true and append the word in cell with "is strikethrough". example: column a column b column d apple apple apple is strikethough where apple is strike through. thanks, regards, Ben |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Font strikethrough
How about:
Option Explicit Sub testme01() Dim myCell As Range For Each myCell In ActiveSheet.Range("A1:A400").Cells With myCell If .Font.Strikethrough _ Or .Offset(0, 1).Font.Strikethrough Then .Offset(0, 3).Value = "is strikethrough" End If End With Next myCell End Sub Ben wrote: Hi Frank, Thanks, it works well. Can it be used in the range of cells for example from range "a2:a400"? how do u coded in vba? thanks. regards, Ben "Frank Kabel" wrote: Hi try with activesheet.range("A1") if .Font.Strikethrough or .offset(0,1).Font.Strikethrough then .offset(0,3).value="is strikethrough" end if end with "Ben" wrote: Hi, How can i coded in vba to check whether the column of two words in the cells has the font strikrthrough equal to true and append the word in cell with "is strikethrough". example: column a column b column d apple apple apple is strikethough where apple is strike through. thanks, regards, Ben -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Font strikethrough
Hi,
Can it be checked that for the range of the cell(a2:a400), some of the cell may not necessary contained the strikethrough word? can it be done? thanks, regards, Ben "Dave Peterson" wrote: How about: Option Explicit Sub testme01() Dim myCell As Range For Each myCell In ActiveSheet.Range("A1:A400").Cells With myCell If .Font.Strikethrough _ Or .Offset(0, 1).Font.Strikethrough Then .Offset(0, 3).Value = "is strikethrough" End If End With Next myCell End Sub Ben wrote: Hi Frank, Thanks, it works well. Can it be used in the range of cells for example from range "a2:a400"? how do u coded in vba? thanks. regards, Ben "Frank Kabel" wrote: Hi try with activesheet.range("A1") if .Font.Strikethrough or .offset(0,1).Font.Strikethrough then .offset(0,3).value="is strikethrough" end if end with "Ben" wrote: Hi, How can i coded in vba to check whether the column of two words in the cells has the font strikrthrough equal to true and append the word in cell with "is strikethrough". example: column a column b column d apple apple apple is strikethough where apple is strike through. thanks, regards, Ben -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Font strikethrough
Do you mean some of the cells are strikethrough and some aren't strikethrough?
Or do you mean some of the words in each cell are strikethrough and some are not (possibly a mixture of both)??? I'm guessing you meant the mixture within the cell. And just A2:A400, Option Explicit Sub testme01() Dim myCell As Range For Each myCell In ActiveSheet.Range("A2:A400").Cells With myCell If .Font.Strikethrough = False Then 'not there Else 'either True or null .Offset(0, 3).Value = "is strikethrough" End If End With Next myCell End Sub Ben wrote: Hi, Can it be checked that for the range of the cell(a2:a400), some of the cell may not necessary contained the strikethrough word? can it be done? thanks, regards, Ben "Dave Peterson" wrote: How about: Option Explicit Sub testme01() Dim myCell As Range For Each myCell In ActiveSheet.Range("A1:A400").Cells With myCell If .Font.Strikethrough _ Or .Offset(0, 1).Font.Strikethrough Then .Offset(0, 3).Value = "is strikethrough" End If End With Next myCell End Sub Ben wrote: Hi Frank, Thanks, it works well. Can it be used in the range of cells for example from range "a2:a400"? how do u coded in vba? thanks. regards, Ben "Frank Kabel" wrote: Hi try with activesheet.range("A1") if .Font.Strikethrough or .offset(0,1).Font.Strikethrough then .offset(0,3).value="is strikethrough" end if end with "Ben" wrote: Hi, How can i coded in vba to check whether the column of two words in the cells has the font strikrthrough equal to true and append the word in cell with "is strikethrough". example: column a column b column d apple apple apple is strikethough where apple is strike through. thanks, regards, Ben -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF Strikethrough | Excel Discussion (Misc queries) | |||
how can I test in a formula if my font is strikethrough or not? | Excel Discussion (Misc queries) | |||
Count cells with strikethrough font? | Excel Worksheet Functions | |||
Strikethrough and Underline Font Macro | Excel Worksheet Functions | |||
Check font strikethrough | Excel Programming |