Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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
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
IF Strikethrough lightbulb Excel Discussion (Misc queries) 5 April 4th 23 02:11 PM
how can I test in a formula if my font is strikethrough or not? JFD_TP Excel Discussion (Misc queries) 1 April 20th 07 03:11 PM
Count cells with strikethrough font? Mike Echo Excel Worksheet Functions 2 November 4th 05 08:42 AM
Strikethrough and Underline Font Macro Rainman Excel Worksheet Functions 0 August 9th 05 01:32 PM
Check font strikethrough Ben Excel Programming 2 November 4th 04 06:38 AM


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