Nih daku bikinin: cara pake lihat dibawah **************************************
Const COLOR_MAX As Integer = 3 Function ColorCycle(n As Integer) As String m = n Mod COLOR_MAX ColorCycle = Switch(m = 0, RGB(255, 0, 0), m = 1, RGB(0, 255, 0), m = 2, RGB(0, 0, 255)) End Function Sub WarnaWarni() Dim cel As Range Set cel = Application.Selection Dim r As Integer Dim c As Integer Dim z As Range For r = 1 To cel.Rows.Count For c = 1 To cel.Columns.Count Set z = cel(r, c) z.Font.Color = ColorCycle(c - 1) Next c Next r End Sub ************************************** 1. Ke VisualBasic Editor (ALT-F11) 2. Bikin Module (Insert Module) 3. Copy/Paste potongan code diatas 4. Pergi ke worksheet trus sorot kolom yang mau diwarna-warni 5. Jalankan Macro ALT-F8 6. Muncul window, pilih WarnaWarni() 7. Hopla.. range yang anda inginkan berwarna warni. Skrip sudah di coba dan berjalan mulus di ExcelXP On Tue, 21 Dec 2004 08:58:32 +0700, Ganda <[EMAIL PROTECTED]> wrote: > > > Hi ITers, > > Gimana caranya membuat suatu formula di excel yg berpatokan pada warna > tulisan? > > Seperti contoh dibawah > > TOTAL SUB1 SUB2 SUB3 > 25 25 > 40 40 > 35 35 > 50 50 > > Saya mau untuk kolom SUB1 semua nilai yng berwarna Merah, SUB2 yg berwarna > Biru dan > > SUB3 yg berwarna Hijau. > > Mohon bantuannya segera.... > > Salam > > Gepe ...del... -- www.ITCENTER.or.id - Komunitas Teknologi Informasi Indonesia Info, Gabung, Keluar, Mode Kirim : [EMAIL PROTECTED] ::: Hapus bagian yang tidak perlu (footer, dst) saat reply! ::: ## Forum: ITCENTER.or.id/forum ## Jobs: ITCENTER.or.id/jobs ## Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/ITCENTER/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/