
vba macro (Ogólne)
Dzięki, to uruchomiło mi zastane klepki w głowie i ogarnąłem. Pewnie można by to zrobić bardziej elegancko i automatycznie, ale mam póki co tylko 4 komórki do sformatowania, więc to wystarcza:
'
' CondF Macro
' Applies conditonal formatting to cells F4-F7
'
'
Sub CondF()
Range("F4").Select
If Selection.Value < 0 Then Selection.Font.ColorIndex = 3 Else Selection.Font.ColorIndex = 10
Range("F5").Select
If Selection.Value < 0 Then Selection.Font.ColorIndex = 3 Else Selection.Font.ColorIndex = 10
Range("F6").Select
If Selection.Value < 0 Then Selection.Font.ColorIndex = 3 Else Selection.Font.ColorIndex = 10
Range("F7").Select
If Selection.Value < 0 Then Selection.Font.ColorIndex = 3 Else Selection.Font.ColorIndex = 10
End Sub
--
DIY woodbox: AM386DX40, 32MB RAM, Diamond Stealth VRAM 1MB, AZT2316, Primax M16B, ST3491A, 256MB CF
Socket 7: AOpen AP59s, Cyrix M II-300GP, 64MB SDRAM, SiS 6326, CT3670, SCSI
Socket A: WinFast K7S741, Sempron 2400+ @1960, 1GB, GF 6600, SB0090, SIL3114