Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Nou pe simpatie: andrum94
 | Femeie 24 ani Galati cauta Barbat 27 - 80 ani |
|
|
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
|
| #1 |
TRaPModerator
Postari: 963
|
|
The following code is based on this topic and it is the first step to be done, but using VBA (by pressing a button) http://mrrrr.3xforum.ro/post/1691/1/EXC ... cted_VBA_/
Sub Z_1InsertCondFormat() Application.ScreenUpdating = False
Dim rng As Range
With ActiveSheet
On Error Resume Next Set rng = Application.InputBox(prompt:="Selecteaza zona in care doresti formatare conditionata:", Type:=8)
If rng Is Nothing Then MsgBox "Ai anulat selectia." Else rng.Select
Dim ActiveCell As String ActiveCell = Excel.ActiveCell.Address(0, 0)
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=OR(CELL(""row"")=CELL(""row"";" & ActiveCell & "))" Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority With Selection.FormatConditions(1).Interior .PatternColorIndex = xlAutomatic .Color = 65535 'or use RGB: .Color = RGB(255, 0, 0) for color red for example .TintAndShade = 0 End With With Selection.FormatConditions(1).Font .Bold = True End With Selection.FormatConditions(1).StopIfTrue = False End If
End With
Application.ScreenUpdating = True End Sub |
|
|
| |
|