Hello Artik,
I have finally been able to adjust it for the font with this code. thank you again.
Range("Main!A1").Offset(KL_Row_Index - 1, Main_Dept_Col - 1).Font.Color = rngDefinedColors.Cells(Group_Identifier).Font.Color
I have this code also which takes almost 25sec - 40 secs for pasting the formula and converting to values. can you please give me an advise on this one also please. this will help me a lot to change the speed of work of the planning.
here is the code am actually using to make the calculation for planning and the converting all in values.
Sub Main_Normal_Calculation()
With Application
'.Cursor = xlWait
.ScreenUpdating = False
.DisplayAlerts = False
.EnableEvents = False
.Calculation = xlCalculationManual
End With
Dim lLR As Long
Sheets("Main").Activate
ActiveSheet.Unprotect
If ActiveSheet.AutoFilterMode _
Then Selection.AutoFilter
Call Remove_Format_On_Loading
With ThisWorkbook.Sheets("Main")
lLR = Cells(Rows.Count, "H").End(xlUp).Row
End With
start_Time = Time
Application.StatusBar = " Automate Calculation Started : Computing ...."
With Range("CK12:HJ" & lLR)
.Formula = "=IF(ISERROR(IF(CK$10<$BK12,0,IF(CK$10>=$BK12,IF(AND(CK$10=$BK12,$BE12<>""""),$BE12,IF(AND(CK$10=$BH12,$BF12<>""""),$BF12,IF(AND(CK$10=$BI12,$BG12<>""""),$BG12,IF(0<($AX12),MIN(($AX12-SUM($CJ12:CJ12)),$BS12)))))))),0,(IF(CK$10<$BK12,0,IF(CK$10>=$BK12,IF(AND(CK$10=$BK12,$BE12<>""""),$BE12,IF(AND(CK$10=$BH12,$BF12<>""""),$BF12,IF(AND(CK$10=$BI12,$BG12<>""""),$BG12,IF(0<($AX12),MIN(($AX12-SUM($CJ12:CJ12)),$BS12)))))))))"
.Application.Calculation = xlCalculationAutomatic
.Value = .Value
End With
Call Build_Delivery_Assessment
Call Launching_Code
'MsgBox Timer - startTime & " secs."
End_Time = Time
Time_String = Format(End_Time - start_Time, "ss")
Application.StatusBar = " Planning Calculation processed in " & Time_String & " secs"
Rows("10:10").Select
ActiveSheet.Unprotect
Selection.AutoFilter
Range("CK10").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowDeletingRows:=True, AllowSorting:=True, _
AllowFiltering:=True
With Application
.Cursor = xlDefault
.ScreenUpdating = True
.DisplayAlerts = True
.EnableEvents = True
.Calculation = xlCalculationManual
End With
End Sub
thank you in advance for your time and help.