Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Conditional Formationg Macro

Hi Glimmer,

Did you try the posted Event macro?

---
Regards,
Norman



wrote in message
oups.com...
ok my final solution---

probably can be improved and if you knwo it could be please feel free
to tell me :)

right its broken into three macros.
1 which detects the date change on the data sheet:

Private Sub Worksheet_Change(ByVal target As Range)

Application.ScreenUpdating = False

Dim rng3 As Range

Set rng3 = Range("B41")

If Not Intersect(target, rng3) Is Nothing Then
Run "FormatJuneStart"
Run "fp12m.FormatJuneEnd"
End If

Application.ScreenUpdating = True

End Sub

1 in the modules section cause i recorded it from excel - this is the
one which copies old format and paste specaisl the format over the new
range.

Public Sub FormatJuneStart()
Application.ScreenUpdating = False
Sheets("Fin Proj").Select
Range("F5:BM265").Select
Selection.Copy
Sheets("12 Mths Fin Proj").Select
Range("F5:BM265").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("BL247").Select
Range("F169:BM169").Select
Range("F6").Activate
Selection.Interior.ColorIndex = xlNone
Application.ScreenUpdating = True
End Sub


and finally the one which highlights the columns which are june

Public Sub FormatJuneEnd()
Application.ScreenUpdating = False
Dim Col
For Col = 6 To 65
If Month(Cells(5, Col)) = 6 Then
With Range(Cells(5, Col), Cells(265, Col)).Font
.Size = 10
.Bold = True
End With
End If
Next Col
Application.ScreenUpdating = True
End Sub


:) yay thank god thats done LOL thanks for your help guys



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
Conditional Macro Stacey Excel Discussion (Misc queries) 2 March 7th 07 05:31 PM
[B]Conditional Macro?[/B] Heydilbert Excel Discussion (Misc queries) 1 November 11th 05 10:07 PM
open cell formationg dialogue from macro dayanand108 Excel Programming 1 July 21st 05 08:44 PM
conditional macro eofeapr Excel Programming 4 April 3rd 05 10:41 AM
Conditional Macro Shelley Shepherd via OfficeKB.com Excel Worksheet Functions 1 February 1st 05 05:32 PM


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