LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 276
Default Modify to do to each required cell

I have the below code that i made to change a the cell to the right to FontStrikeThrough IF the value to in tyhe cell was empty.
If it was not empty then the cell would Not be StrikeThrough

EG: The (6) in Cell D1 would be StrikeThrough as there is No value in C1.
The (5) is Normal Font as there IS a value in A1.

A B C D E F
1 10 5 6
2


I need to add to the below so it does the same to all these cells listed:
C100,E100,G100,I100..... AQ100
(Basically every 2nd Cell from C100 - AQ100)
How can i do this besides putting every cell in individually and running the code each time ?

~~~~~~~~~~~~~~~~~~~~~
Sub StrikeThrough()
With ActiveCell
If ActiveCell.Value = "" Then
ActiveCell.Offset(0, 1).Activate
With Selection.Font
.Strikethrough = True
End With
Else
ActiveCell.Offset(0, 1).Activate
With Selection.Font
.Strikethrough = False
End With
End If
End With
End
~~~~~~~~~~~~~~~~~~~~
--
Corey ....
The Silliest Question is generally
the one i forgot to ask.
 
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
Modify each cell in selection Clayman Excel Programming 3 August 11th 08 08:51 PM
How do I modify Cell Comments from VBA? MikeZz Excel Programming 2 April 13th 07 09:56 PM
Modify a cell Vern Excel Discussion (Misc queries) 0 January 19th 07 08:51 PM
Modify Cell sizes Louanne Excel Worksheet Functions 3 December 31st 05 05:02 PM
How can I modify the color of a cell? James Prontier Excel Programming 3 January 10th 04 07:51 PM


All times are GMT +1. The time now is 05:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"