Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Strikethrough cells B2 to E2 (a "row", in essence) when A2 has a checkmark?

The reason this is tricky is because all the other columns have all 3
possible conditional formatting slots taken, so it seems one would need to
use code for this.

I use the square root symbol (representing a checkmark) in a pulldown menu
in column A. So column A is either empty or it has this symbol. When
empty, nothing happens; but if user chooses this "checkmark" symbol, the
cells in column B to E of that row should then have a strikethrough applied
to the text in that row. Also, where would one put the vb code to do this?
I've searched the archives but so far no mention has been made on where this
type of code to augment conditional formatting should go.

tia :oD


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default Strikethrough cells B2 to E2 (a "row", in essence) when A2 has a c


Place this code in the "sheet" module that corresponds to the sheet you want
to monitor.

Regards,
Bill


Private Sub Worksheet_Change(ByVal Target As Range)
Dim strAddress As String
Dim rngFormat As Range

If (Target.Cells(1).Column = 1) Then
strAddress = "B" & Trim$(Target.Cells(1).Row) & ":E" &
Trim$(Target.Cells(1).Row)
Set rngFormat = Target.Parent.Range(strAddress)

If (Len(Target.Cells(1).Value) = 0) Then
rngFormat.Font.Strikethrough = False
ElseIf (Asc(Target.Cells(1) = 118)) Then ' 118 is the ascii code
for the sq rt symbol
rngFormat.Font.Strikethrough = True
End If

Application.Calculate
End If

End Sub



"StargateFanFromWork" wrote:

The reason this is tricky is because all the other columns have all 3
possible conditional formatting slots taken, so it seems one would need to
use code for this.

I use the square root symbol (representing a checkmark) in a pulldown menu
in column A. So column A is either empty or it has this symbol. When
empty, nothing happens; but if user chooses this "checkmark" symbol, the
cells in column B to E of that row should then have a strikethrough applied
to the text in that row. Also, where would one put the vb code to do this?
I've searched the archives but so far no mention has been made on where this
type of code to augment conditional formatting should go.

tia :oD



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
Remove checkmark on "Update links to other documents" Per Baden Links and Linking in Excel 4 September 15th 08 01:32 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How do I get "&S" to just be "&S" text instead of strikethrough? Jaclyn Excel Discussion (Misc queries) 1 March 24th 06 07:01 PM
"IF" statement & "strikethrough" formatting jijy Excel Worksheet Functions 3 March 22nd 06 06:56 PM
Enter a "checkmark" in an AutoFiltered cell L Mehl Excel Programming 2 September 27th 04 12:30 AM


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